On Tue, Aug 6, 2024 at 7:48 PM m-stgt m-stgt@users.sourceforge.net wrote: Hi Rick, first: thank you for your time and your effort to explain the idiosyncrasy of ooRexx. I know I do have some problems with it, since my approach still is strongly biased by REXX as I know it from VM/CMS. When you enter help rexx menu on CMS you get a list of functions and commands on one single screen, looking in the ooRexx Ref. Mnl. the table of contents from 2 Keyword Instructions up to 8 Rexx Utilities is about six...
On Mon, Aug 5, 2024 at 8:20 PM m-stgt m-stgt@users.sourceforge.net wrote: After I achieved (with lots of kind help) to couple stems in different scopes First of all, you are NOT coupling variables. I have explained this to you multiple times. What you have are different variables referencing a mutable object. The different variables can see the changes because the object is mutable. I tried to do the same with simple variables. "The same" means one single assignment to the .constDir only and only...
hist. = 0 is an assignment to a stem variable. hist.5 = 0 is an assignment to a compound variable, which must adds/alters a an entry of the stem object reference by the stem variable. Stem assignment is documented in Section 1.13.4 Stem in the oorexx reference. Rick On Sun, Aug 4, 2024 at 7:58 PM m-stgt m-stgt@users.sourceforge.net wrote: Then, please, could you explain the fundamental difference between hlst. = 0 and hlst.5 = 0. And where it is documented. VM/CMS GLOBALV in ooRexx Sent from sourceforge.net...
On Sun, Aug 4, 2024 at 7:38 PM m-stgt m-stgt@users.sourceforge.net wrote: Once again, using stem in ooRexx like I would on VM/CMS, fails. Because I'm not fluent with the correct terms of those oo-ish components I can't report this error directly as a ticket, I may just show what happens. As suggested in this thread, I share variable's content within a scope by expose and for "trans-scope interchange" something like e.g. .constDir[GLV_PRSTAT] = hlst. in the leading program and corresponding hlst....
I mentioned that using attributes was slower that directly assigning to exposed variables but I had honestly never measured the difference. I wrote a quick and dirty benchmark program and the difference is that using attributes is roughly 2.5 times slower than doing a direct assignment. This probably won't make a noticeable difference for most programs, but it can add up if you do enough of them. Rick test = .test~new test~testit ::class test ::attribute att1 ::method testIt expose att1 t1 = .datetime~new...
On Sat, Jul 20, 2024 at 9:01 AM Robert Bridges bobbridges@users.sourceforge.net wrote: I have ATTRIBUTE SET working when I do it from the main routine. But when I try to do it between attributes, nothing seems to happen. Specifically: ~~~ ox=.myclass~new ox~att1="string" exit ::class myclass ::attribute att1 get ::attribute att1 set expose att1 att2 use arg att1 att2=att1 ::attribute att2 get ::attribute att2 set expose att2 use arg att2 say att2 ~~~ When I set ox~att1 from the main routine, the...
On Sat, Jul 20, 2024 at 8:53 AM Robert Bridges bobbridges@users.sourceforge.net wrote: I've been playing with ATTRIBUTE GET/SET. In a very simple program, this doesn't work correctly: ~~~ ox=.myclass~new ox~att="string" say 'main' ox~att exit ::class myclass ::attribute att get ::attribute att set use arg att say 'class' att ~~~ I would expect it to display first "class string" and then "main string", but the second line comes out "main ATT" instead. I can fix it by inserting "EXPOSE att" in the...
I think I'm starting to understand your confusion. I believe you are confusing the class methods of the .String class with the instance methods of strings. The POSIX methods are class methods of the .String class and just return a string object containing the set of characters in that category. For example, upper, lower, alpha, etc. Note that these are the same strings you can obtain from XRANGE('upper'), etc. String objects have instance methods that perform functions on individual string instances....