I have never seen such a construct in NetRexx;
java_integer=int 12345;say Rexx(java_integer).right(3) What other terms can go in the Rexx( ) function? Bob Hamilton _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Bob
You break it like: java_integer = int 12345 -- variable java_integer is an int with value 12345 say Rexx(java_integer).right(3) -- take java_integer, convert it to Rexx type, the print the 3 rightmost characters
Regards, 2011/10/4 Robert Hamilton <[hidden email]> I have never seen such a construct in NetRexx; Saludos / Regards, David Requena _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
I just had never seen 'REXX' used as a function.
BobH On 10/4/11, David Requena <[hidden email]> wrote: > Bob > > You break it like: > > java_integer = int 12345 -- variable java_integer is an int with value > 12345 > say Rexx(java_integer).right(3) -- take java_integer, convert it to Rexx > type, the print the 3 rightmost characters > > Regards, > > > > 2011/10/4 Robert Hamilton <[hidden email]> > >> I have never seen such a construct in NetRexx; >> >> java_integer=int 12345;say Rexx(java_integer).right(3) >> >> What other terms can go in the Rexx( ) function? >> >> Bob Hamilton >> >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ >> >> >> > > > -- > Saludos / Regards, > David Requena > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Robert Hamilton <[hidden email]> wrote:
>I just had never seen 'REXX' used as a function. > It's not a function, it's a cast (NetRexx style). Sent from my Motorola ATRIX™ 4G on AT&T _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Robert L Hamilton
> > I just had never seen 'REXX' used as a function. It is a constructor for strings of type (class) Rexx. Mike _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Robert L Hamilton
Bob,
A "function" with the same name as the class is a "constructor" for that class. Class Rexx has a number of constructors listed in Appendix C of the NetRexx manual. While you're there you might take a look at the Rexx Miscellaneous Methods. George On Tue, Oct 4, 2011 at 9:13 AM, Robert Hamilton <[hidden email]> wrote: I just had never seen 'REXX' used as a function. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Robert L Hamilton
Bob,
essentially you can put in any Java primitive type, Rexx String's, and Char Arrays into Rexx(...), as well as any expression of those, and the resulting value will be converted to Rexx. this is currently the only method to use all of the mentioned above, when you want to use one of the Rexx Builtin methods:-) Thomas. PS: When my memory serves me right ;-) ====================================================== Am 04.10.2011 14:33, schrieb Robert Hamilton: I have never seen such a construct in NetRexx; --
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Robert L Hamilton
Robert, it is exactly *not a function*, it is a Rexx Constructor,
constructing a Rexx Object! Thomas. ======================================================== Am 04.10.2011 15:13, schrieb Robert Hamilton: > I just had never seen 'REXX' used as a function. > > BobH > > On 10/4/11, David Requena<[hidden email]> wrote: >> Bob >> >> You break it like: >> >> java_integer = int 12345 -- variable java_integer is an int with value >> 12345 >> say Rexx(java_integer).right(3) -- take java_integer, convert it to Rexx >> type, the print the 3 rightmost characters >> >> Regards, >> >> >> >> 2011/10/4 Robert Hamilton<[hidden email]> >> >>> I have never seen such a construct in NetRexx; >>> >>> java_integer=int 12345;say Rexx(java_integer).right(3) >>> >>> What other terms can go in the Rexx( ) function? >>> >>> Bob Hamilton >>> >>> _______________________________________________ >>> Ibm-netrexx mailing list >>> [hidden email] >>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ >>> >>> >>> >> >> -- >> Saludos / Regards, >> David Requena >> > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > > -- Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Tom Maynard
Tom,
it's not a CAST, it's the Rexx constructor! Casts are not denoted by parenthesis (as in Java), but prepending them to a term / expression, separated by a blank operator. *OR* ABUT operation or CONCATENATION. By the way, Language experts, I think the allowance of ABUT and CONCATENATE should be REMOVED, only BLANK operation should be allowed (personal feeling).... Thomas. ======================================================= Am 04.10.2011 16:09, schrieb Tom Maynard: > Robert Hamilton<[hidden email]> wrote: > >> I just had never seen 'REXX' used as a function. >> > It's not a function, it's a cast (NetRexx style). > > > Sent from my Motorola ATRIX™ 4G on AT&T > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > > -- Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
Thomas,
Re "I think the allowance of ABUT and CONCATENATE should be REMOVED, only BLANK operation should be allowed" That will break most of my programs. BTW, how would you assemble strings from pieces without intervening spaces? George On Tue, Oct 4, 2011 at 11:13 AM, Thomas Schneider <[hidden email]> wrote: Tom, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by ThSITC
Thomas,
Re "personal feeling" When one of these feelings comes over you, why not lie down for a while until it goes away :-). On Tue, Oct 4, 2011 at 11:13 AM, Thomas Schneider <[hidden email]> wrote: Tom, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by George Hovey-2
George, I'm sorry, I did mis-formulate my ANSWER:
As it is, NetRexx does allow the ABUT and CONCATENATE Operators, in addition to the BLANK Operator, to DESIGNATE a CAST operation, for instance: x=String 'George Hovey' y = Rexx x (using the BLANK operator to CAST the String to Type Rexx But please do (all) note, that according to the NetRexx Language Spec, also y=Rexx||x is ALLOWED as a NOTATION (cannot recall the page of the nrl2.pdf, but I'm sure it's in there ...). I've not yet printed out the nrl3.def, due to lack of paper, sorry. . also, for instance, z=Rexx'Thomas Schneider' is allowed in the nrl2.pdf, at least. Now, with Rexx as the class name (which is actually determining the Type of the variable on the left hand side) the meaning might be obvious. But consider I'm importing a package, defining a class 'abc' , for instance. using the latter two notations (ABUT and CONCATENATE) to denote CASTING ! x=abc!!'and my other string' EVERYBODY will seek for a variable abc in the source, and not for an IMPORTED Type (class). And that is, what I ment! Sorry when I did raise any confusion (as always <grin>) OF COURSE, BLANK, ABUT, and CONCATENATE in expressions have to remain as defined :-) But, for more complicated NetRexx programs, it's sometimes a bit complicated to see whether a token represents a type or a variable (by notation) Thomas Schneider. =======================================================. Nearly everybody will attemt Am 04.10.2011 18:11, schrieb George Hovey: Thomas, --
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by George Hovey-2
See previos answer. When needed, I will lay down, take the nrl2.pdf,
ans seek for the page number where this rule for denoting casting is
mentioned.
I always am laying down when reading manuals <grin> ... Thomas. ========================================================== Am 04.10.2011 18:15, schrieb George Hovey: Thomas, --
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Mike Cowlishaw
Is there any particular reason why there are no Rexx constructors for
the wrapper classes (Byte, Integer, etc.)? Do you see any problem with adding them? On 10/4/2011 7:33 AM, Mike Cowlishaw wrote: > >> I just had never seen 'REXX' used as a function. > It is a constructor for strings of type (class) Rexx. > > Mike > > _______________________________________________ > 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/ |
> Is there any particular reason why there are no Rexx
> constructors for the wrapper classes (Byte, Integer, etc.)? > Do you see any problem with adding them? Not absolutely certain, but I don't think they existed originally. But if they did I suspect I would not have added them because then loading the Rexx class would pull in the others. That would slow down startup, even if they were on the local machine. If they were not in the JRE then that would mean hauling them across the internet if used in an applet (and broadband was rare, then). In general I tried to make the Rexx classes as standalone as possible, and split them in a way to try and minimise what would get pulled in. Mike _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
On 05.10.2011 09:02, Mike Cowlishaw wrote: Interesting, you may be right that not all of them existed originally (in JDK 1.0.2). According to the docs of JDK 1.1 the following wrapper classes got added in 1.1:Is there any particular reason why there are no Rexx constructors for the wrapper classes (Byte, Integer, etc.)? Do you see any problem with adding them?Not absolutely certain, but I don't think they existed originally. + java.lang.Byte + java.lang.Short + java.lang.Void ---ronyBut if they did I suspect I would not have added them because then loading the Rexx class would pull in the others. That would slow down startup, even if they were on the local machine. If they were not in the JRE then that would mean hauling them across the internet if used in an applet (and broadband was rare, then). In general I tried to make the Rexx classes as standalone as possible, and split them in a way to try and minimise what would get pulled in. _______________________________________________ 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/ |
In reply to this post by Rony G. Flatscher (wu-wien)
May I add, that for the current (other) discussions about the
SIGNATURE finding problem,
it is *of utmost importance*, that the current NetRexxC COSTING algorithm does build a *List of all possible choices* (*including RETURN TYPE*, which may be VOID) Before making the decision, which method to use.... ;-) Thomas Schneider. =============================================================== Am 05.10.2011 11:43, schrieb Rony G. Flatscher:
--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Mike Cowlishaw
It would be a very interesting task to count *your neuron's*, Mike.
:-)
When looking at www.speleotrove.com, I'm sure you do still have more, than I ever did have ... Thomas. ==================================================================== Am 05.10.2011 12:16, schrieb Mike Cowlishaw:
--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Mike Cowlishaw
Hi Mike,
Re "In general I tried to make the Rexx classes as standalone as possible, and split
them in a way to try and minimise what would get pulled in." and Kermit's inquiry about adding Rexx constructors.It has long been my dream to port NetRexx to a JVM operating in a Field Programmable Gate Array (FPGA), as this would have some important laboratory applications (and support the luxurious programming environment to which I've become accustomed!). Before I saw the NetRexxR source I feared I would need to incorporate many Java classes which would in turn drag in more, until the whole thing ballooned out of control. I was relieved to discover that NetRexxR uses Java very sparingly. The collection classes needed -- Vector, Hashtable, etc -- are included in CLDC. The I/O classes are not, but they have (pretty much) direct replacements in CLDC. I still have some issues related to Ask but, I think, don't involve NetRexx. The actual changes required are rather small (though the background reading was not 8-) ). I hope our architects will keep in mind your "principle of parsimony" with respect to use of Java classes in the runtime, perhaps even keeping an eye on CLDC and Sun's Connected Device Configuration, (CDC). Attention to these would ease upgrading efforts like mine to incorporated NetRexx's "latest and greatest" improvements as these evolve. On Wed, Oct 5, 2011 at 3:02 AM, Mike Cowlishaw <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |