getnode directly from Java

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

getnode directly from Java

Jason Martin
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: getnode directly from Java

Jason Martin
Looking in programming guide.

merged[’d’] == 'def'

Is this intended behavior?

Each call to a non-existent key adds to the index with the value of the caller without the leaf set.




On Thu, Aug 6, 2015 at 4:15 PM, Jason Martin <[hidden email]> wrote:
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: getnode directly from Java

Kermit Kiser
Yes.

You are correct.

If you are asking why this happens, consider this statement:

merged["e","f"]="notdef"

Although merged["e"] has not been initialized, the node must exist in order to find merged["e","f"] since it is chained from the "e" node.

-- Kermit

On 2015-08-06 5:51 PM, Jason Martin wrote:
Looking in programming guide.

merged[’d’] == 'def'

Is this intended behavior?

Each call to a non-existent key adds to the index with the value of the caller without the leaf set.




On Thu, Aug 6, 2015 at 4:15 PM, Jason Martin <[hidden email]> wrote:
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: getnode directly from Java

Jason Martin
In reply to this post by Jason Martin
Ok. Thank you.

Does anybody have any sample code that uses it in that way?

Just trying to understand how or why the concept would solve some computing task or problem. 
 

On Thu, Aug 6, 2015 at 4:15 PM, Jason Martin <[hidden email]> wrote:
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: getnode directly from Java

George Hovey-2
Jason,

merged = "?"
merged[1. 2]="defined"

I believe at one time even though merged[1] had not been defined, the setting of merged[1, 2] would succeed, without creating merged[1].  This led to an ugly situation:

1. 'Say  merged[1, 2]' produces "defined".
2. The same element is invisible to a 'Loop Over', because without merged[1] there is no clue that it exists.

If I remember correctly, the (silent) setting of merged[1} was added to avoid this ugly situation.  Personally, I thought it something the programmer probably didn't intend and really needed to know about; and deserved an Exception.


On Sun, Aug 9, 2015 at 9:42 AM, Jason Martin <[hidden email]> wrote:
Ok. Thank you.

Does anybody have any sample code that uses it in that way?

Just trying to understand how or why the concept would solve some computing task or problem. 
 

On Thu, Aug 6, 2015 at 4:15 PM, Jason Martin <[hidden email]> wrote:
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/





--
"In science, there is only physics; all the rest is stamp collecting." - Ernest Rutherford

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: getnode directly from Java

Jason Martin
In reply to this post by Jason Martin
So the programmer needs to be aware that:

if merged["auto-incremented"] gets caught in a loop.

You will not know until memory is exhausted.

On Thu, Aug 6, 2015 at 4:15 PM, Jason Martin <[hidden email]> wrote:
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: getnode directly from Java

David Holiday
In reply to this post by Jason Martin

please unsubscribe me from this list

On Aug 6, 2015 1:15 PM, "Jason Martin" <[hidden email]> wrote:
/* Although it's undocumented */

/* These are for NetRexx compiler to use; normally undocumented. */

foo="def"
foo["a"]=1
foo["b"]=2

/* NetRexx Compiler catches this */
foo["q"]

/* Using the runtime library directly from Java does not */ 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/