Good suggestion makes it less messy as you mentioned, thanks again. Ruurd
I would isolate the method invocation and signal trapping inside of a routine. That way the loop is not interrupted by the signal and you don't have to deal with the messy restarts. Rick On Thu, Dec 11, 2025 at 12:34 PM Ruurd Idenburg idenburg@users.sourceforge.net wrote: Thanks Rick. Now in order to keep processing the rest of the methods I can think only of this: ~~~ !/usr/bin/env rexx signal on any name syntax rexxInfoInstance = .RexxInfo rexxInfoInstanceMethods = rexxInfoInstance~class~methods(rexxInfoInstance~class)~allindexes~sort...
Thanks Rick. Now in order to keep processing the rest of the methods I can think only of this: #!/usr/bin/env rexx signal on any name syntax rexxInfoInstance = .RexxInfo rexxInfoInstanceMethods = rexxInfoInstance~class~methods(rexxInfoInstance~class)~allindexes~sort i = 1 -- i initially 1, after possible signal will be set by the syntax signal processing again: do m=i to rexxInfoInstanceMethods~items method = rexxInfoInstanceMethods[m] say ".RexxInfo instance method" method ":" rexxInfoInstance~send(method)...
COPY is an instance method of .RexxInfo. It's job is to override the .Object COPY method and raise the not supported error message. Rick On Thu, Dec 11, 2025 at 10:05 AM Ruurd Idenburg idenburg@users.sourceforge.net wrote: I was trying to make a demo of displaying the results of invoking all .RexxInfo methods with the l following code: tryRexxInfo.rex ~~~ !/usr/bin/env rexx rexxInfoInstance = .RexxInfo rexxInfoInstanceMethods = rexxInfoInstance~class~methods(rexxInfoInstance~class)~allindexes~sort...
I was trying to make a demo of displaying the results of invoking all .RexxInfo methods with the l following code: tryRexxInfo.rex #!/usr/bin/env rexx rexxInfoInstance = .RexxInfo rexxInfoInstanceMethods = rexxInfoInstance~class~methods(rexxInfoInstance~class)~allindexes~sort say rexxInfoInstanceMethods do method over rexxInfoInstanceMethods say ".RexxInfo instance method" method":" rexxInfoInstance~send(method) end yielding the following result on the console: ruurd@Paradigit2:~/Rexx$ rexx tryRexxInfo.rex...
I was trying to make a demo of displaying the results of invoking all .RexxInfo methods with the l following code: tryRexxInfo.rex #!/usr/bin/env rexx rexxInfoInstance = .RexxInfo rexxInfoInstanceMethods = rexxInfoInstance~class~methods(rexxInfoInstance~class)~allindexes~sort say rexxInfoInstanceMethods do method over rexxInfoInstanceMethods say ".RexxInfo instance method" method":" rexxInfoInstance~send(method) end yielding the following result on the console: ruurd@Paradigit2:~/Rexx$ rexx tryRexxInfo.rex...
+1 Merci Jean Louis! Gil B.
+1 Merci Jean Louis!
Hello Rony, I knew that the oneliner was wrong... I did not care about handling the condition, I just wanted to know if the condition was raised, and it was raised for a variable not starting with an environment symbol Thank You for the explanation, I was just curious Enrico
To facilitate testing, I am attaching the rexxtry-eof.rex file where the fix has been applied. I created this version of rexxtry because my battery was drained after testing a Rexx filter for rlwrap. $ rlwrap --filter $PWD/filter.rex rexxtry rexx filter rlwrap: error: error writing to filter: Broken pipe filter.rex is empty for the moment, I wanted just to confirm that rlwrap accepts a rex filter, which it does. After running several tests, I later discovered that multiple rexx processes were still...
Thanks P.O.
The program on the command line is in error, use >rexx -e "signal on novalue name novalue; say .local~novar; say .novar; say novar;exit;novalue: say condition(c)':' condition(d) 'in line #' sigl" instead. Or in a standalone file: signal on novalue name novalue say .local~novar; say .novar; say novar exit novalue: say condition('c')":" condition('d') "in line" sigl":" sourceline(sigl)
If you send a message directly to a directory, and there is no entry by the name of the message you get .nil back, indicating that there was no entry found. If you use an environment symbol (one that starts with a dot) then the runtime will check out all environment directories for an entry and if there is no entry found, the environment symbol in uppercase will be returned by the runtime.
faster to post the one liners than write an essay to describe it [enrico@enrico-mbp enigma-machine-2]$rexx -e "say .local~novar; say .novar" The NIL object .NOVAR [enrico@enrico-mbp enigma-machine-2]$ i realize that the behavior is different from the one for normal variables for .local variables the novalue signal is not caught [enrico@enrico-mbp enigma-machine-2]$rexx -e "signal on novalue name novalue; say .local~novar; say .novar; say novar" The NIL object .NOVAR 1 - say novar Error 16 running...
Using balanced ternary notation I would have to give a „0“ here; I rarely have any opinion on changes to the code base, I expect Erich or Rick to speak up (-1) if there are side effects that you have not thought of. So If you here nothing from me it means „0" Hälsningar/Regards/Grüsse, P.O. Jonsson oorexx@jonases.se Am 07.12.2025 um 22:24 schrieb jfaucher jfaucher@users.sourceforge.net: On 7 Dec 2025, at 21:32, Rony G. Flatscher orexx@users.sourceforge.net wrote: Ah, I see. A question Jean Louis:...
+1 ---rony
Hmm, I see. +1
On 7 Dec 2025, at 21:32, Rony G. Flatscher orexx@users.sourceforge.net wrote: Ah, I see. A question Jean Louis: as you are a committer, wouldn't you want to commit the patch yourself? I could, but a) I’d prefer to wait and see if any +1 or -1 feedback comes in. Even if that take weeks, it's ok. b) I will never push a commit to trunk without a minimum of discussion/agreement. That's why I prefer to submit patches.
Ah, I see. A question Jean Louis: as you are a committer, wouldn't you want to commit the patch yourself?
Guten Abend Rony In this RFE, I don’t bother with PDFs; I just hit Ctrl-C so hard the script surrenders at EOF.
Building on Jean Louis' idea and code, a variant would be: say sum(1, 2, 3, 4) -- 10 calculator = .calculator~new say calculator~sum(1,2,3,4) -- 10 ::routine sum public sum = 0 do i=1 to arg() sum += arg(i) end return sum ::class calculator public ::method sum return .routines~sum~callWith(arg(1,a)) This version would allow to first define all routines and then create the classes with methods that call the routines .
AFAIK net-oo-rexx sets REXX_HOME on all operating systems, including Unix. It may be the case that some installations also define REXX_HOME on non-Windows platforms. So how about testing whether $REXX_HOME"/bin/rexxref.pdf" exists, and if so, load the pdf file? On Linux on could use the command "xdg-open", on macOS "open" which will search and use the editor that can handle ".pdf" extensions? If REXX_HOME is not defined, or doc/rexxref.pdf cannot be located, then one could issue the error messag...
Better support of EOF in rexxtry
Determine whether a stream is associated with a terminal
Thank You Jon, Rick unfortunately IMO the reference manual is not very user friendly :.; it has everything you need but it is not easy to find it and ... you MUST be aware of the classes hierarchy the array class docs does not have the description of copy method ... but it is there and described in ... Methods inherited from the Object class so I just learned someting new today ! thanks again Enrico
This is true for all assignments. A variable just holds a reference to an object instance. In the case of strings, they are immutable, so you don't see the effects of any changes. But anyway, the easiest way to copy an array is otherArray = firstArray~copy Rick On Fri, Dec 5, 2025 at 12:56 PM Enrico Sorichetti atncsj6h@users.sourceforge.net wrote: I just found out that the an assignment statement for array is not a real asignment , it just an alias definition for the original array I found that the...
I'm not sure if I understand what you are asking, but is newArray = array~copy what you are looking for? On Fri, 5 Dec 2025 at 17:56, Enrico Sorichetti atncsj6h@users.sourceforge.net wrote: I just found out that the an assignment statement for array is not a real asignment , it just an alias definition for the original array I found that the statement b = a~section(1) creates a real copy but I find the solution pretty unelegant and misleading it works in my case because the arrays are just vectors...
I just found out that the an assignment statement for array is not a real asignment , it just an alias definition for the original array I found that the statement b = a~section(1) creates a real copy but I find the solution pretty unelegant and misleading it works in my case because the arrays are just vectors but I would like to know if there is a better ( more elegant way ) for copying an array elegant and consisting code is easier to understand and maintain ! Thank You all in advance Enrico
Hello Enrico I think what you need is the sendWith method of the Object class. calculator = .calculator~new say sum(calculator, 1, 2, 3, 4) -- 10 say calculator~sum(1,2,3,4) -- 10 ::routine sum use arg object, ... rest = arg(2, "a") return object~sendWith("sum", rest) ::class calculator ::method sum sum = 0 do i=1 to arg() sum += arg(i) end return sum
where can I find in the docs the proper way to write a bimodal function I.E that can invoked in both ways - obviously with the same name PROCEDURAL ... result=function_name(all the arguments) OBJECT ORIENTED ... result=arg1~function_name(the rest of the arguments) thank You in advance Enrico
Thanks for the pointer! (I was only looking in the PDFs.) :-( -mb
Hi Mark, The information you are looking for can be found in the CHANGES.txt document. The Address … With came in 5.0.0 release. Look it up here: https://sourceforge.net/projects/oorexx/files/oorexx/5.0.0/ Hälsningar/Regards/Grüsse, P.O. Jonsson oorexx@jonases.se Am 03.12.2025 um 17:58 schrieb Mark Boonie markboonie@users.sourceforge.net: I couldn't find this information in the documentation, although it's possible I simply didn't look in the right place. Is there a list of when features were introduced,...
I couldn't find this information in the documentation, although it's possible I simply didn't look in the right place. Is there a list of when features were introduced, additions made, etc.? I was trying to find out when the WITH stuff was added to the ADDRESS instruction and couldn't find anything like a "new in this release" list. (If this information already exists, I apologize for not searching thoroughly enough.) mb
Allow backward iteration over collection and supplier
If you need to reuse a name, you can do this: value= "" or better yet: drop value value= ""
Hello! I have a variable: value = .stem~new() or value = .array~new() What's the correct way to delete it to reduce the load on the system? But also freeing up resources as quickly as possible. value=.nil or drop value
Hmm, creating external functions/methods incurs the dependency on an additional envrionment. It just seems to be the case for oo/Rexx programmers that they do not "see" C/C++ as they have been used from day one for adding external functionality to oo/Rexx. However, using commands or Java from ooRexx is the same conceptually as using C/C++ IMHO. In case you wish to create your own C/C++ interfaces it would not be that difficult for ooRexx. You may want to take a look at the 2015 International Rexx...
My take would be that ooRexx 5.0.0 should be compatible with ooRexx 4.2.0 in every possible respect. This has been the case for all previous versions of ooRexx as this makes sure that older ooRexx programs continue to run unchanged. (All differences between ooRexx 4.2 and 5.0 got documented in rexxref.pdf, Appendix B. Migration.) Given the many and deep changes to 5.0 over so many years of development I would speculate that sometimes something got overlooked, because no test cases were present to...
The current ooRexx 5 implementation returns a method only if this method has been defined on the class. The inherited methods are not taken into account. say .weakreference~method("INIT") Oooops ! ... try again. Object method not found. The proposed fix will change this behaviour, making it similar to ooRexx 4.2. say .weakreference~method("INIT") a Method rexxref ~method doesn't say that ~method can return a superclass method. ~methods say that a superclass method can be returned, in function of...
say .buffer~method("INIT") crashes the interpreter
I think the DO OVER is a wonderful piece of syntactic sugar, but as fr as I'm aware there is no way to do what you want with it as it currently stands. I would code do index over DIM~allIndexes~sortwith(.descendingcomparator~new) item = DIM[index] end / DO / But it is nowhere near as readable and requires a clause inside the loop. I do see that Rick just put in a feature request for this, so perhaps future versions... https://sourceforge.net/p/oorexx/feature-requests/865/ On Sun, 30 Nov 2025 at 20:52,...
20251130 IPO caused segmentation faults in release versions on Unix, revert to r13046.
Alternatively, you could do this: do _n=DIM~last to 1 by -1 end _n
Add a non-numeric form of iterated loop
Hello! I have a DIM array. To traverse it from the first to the last element, I can use a loop like this: do Item over DIM end Question: Is there a way to traverse the array from the last element to the first?
Add Unicode (UTF-8) support to syntax error 13.1
1.1. Rexx Interpreter API ... Interpreter environments are created using the RexxCreateInterpreter API: would however be very interesting to add not only in the C engine for LLM 3.2, but with as many other tasks/projects/uses as well, not related to AI. Then we'd have pure ooRexx implementations to write home about.
List properties and methods for an OLEObject
curl /wget is another layer, but have considered it. yes, another... . yes, have looked at that presentation as well. It require me to learn some Python.
As you are asking for help from students: this always depends on acquainted IT students, however in my environment there are Business Administration students. There are at least three possiblities I can think of: 1. Skim over https://wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/350_LLM_Curl.pdf, these are new slides that show how to interact with ChatGPT and Grok from ooRexx via curl, which is almost identical (except for API key and model names). Then you could check out something like https://markaicode.com/curl-commands-ollama-api-testing-tutorial/....
I don't do Python, nor Linux. I have a need to use an AI model locally and allow it to call code that can do things... that ooRexx is good at in my opinion. I've found llama3.2.c that use code written in C and I've adjusted it to compile on Windows with OpenWatcom v.2. Would it be possible to ask for help (from student) to add callback functionality to allow ooRexx scripts on the side (done this in the past on Windows and OS/2) to perform certain tasks?
So, you do not find any documentation in the ooRexx documentation folder? I pointed you to that folder in my answer above; hence, I am a bit baffled that you have not realized it or found that folder. If you use the Windows search bar and enter "ooRexx Windows Reference", Windows should display a link that you simply need to click. Ignoring these pointers does not help solve your problem. The same applies to the samples: there are a few WMI samples, and I mentioned oleinfo, which you seem not to...
Thank you for your outstandingly reply. I have studied the documentation. If this information is there, I can't find it. You could at least have pointed out where it is. There supplied samples in no way relate to the question I asked. I know, because I already looed there. If you fancy providing a useful answer, I'm all ears.
First of all, before opening a bug, study the documentation which has been created and updated with great efforts! If you take a look at the documentation folder you will find a Windows specific pdf book (ooRexx Windows Reference) which documents all the Windows specific ooRexx classes, among them OLEObject which gets used to interact with Windows and Windows applications. Just skimming over the available methods tells you that it is possible to interrogate the published methods, attributes/properties,...
List properties and methods for an OLEObject