ARexx "not not" bug

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: ARexx "not not" bug

Post by broadblues »

polluks wrote:Sorry guys, all prefix operators are broken:

Code: Select all

say --1
say ++1
If you take a look in the "bible":
"There may be one or more prefix operators to the left of any term."
https://books.google.de/books?hl=de&id= ... refix+plus

C'mon, our implementation is not a decision by design but simply incomplete.
It's slower, you have to parse extra parentheses.
But we don't have an implmentation of IBM Rexx we have an implemenation of ARexx, it's a seperate language, with different constructs, the time loss in dealing with brackets must be fairly trivial overall, especially when you will often end waiting for a command passed to a host via address to return.

What do you need 'not not' for anyway? It seems a bit redundant.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: ARexx "not not" bug

Post by xenic »

polluks wrote: If you take a look in the "bible":
You're looking at the wrong "bible". The "bible" for ARexx is "ARexx Users Reference Manual 1.0" by William S. Hawes (the author of Amiga ARexx). It's a moot point anyway. There are no plans to ever change/update OS4 ARexx.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: ARexx "not not" bug

Post by nbache »

thomasrapp wrote:What sense does it make to invert an inverting operator? Instead of ~~0 you could write just 0. Would be even faster, no operator to parse at all.
Of course ~~0 doesn't give any benefits. But as salass00 pointed out earlier in the thread, ~~x could be used to "normalize" the value of x to a (boolean-like) 0 or 1, like it is commonly done in e.g. JavaScript.

Best regards,

Niels
User avatar
polluks
Posts: 55
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: ARexx "not not" bug

Post by polluks »

broadblues wrote:But we don't have an implmentation of IBM Rexx we have an implemenation of ARexx, it's a seperate language, with different constructs, the time loss in dealing with brackets must be fairly trivial overall, especially when you will often end waiting for a command passed to a host via address to return.
However I have to write a bug report for Regina (http://regina-rexx.sourceforge.net) because its ARexx mode is not compatible.
The other way around seems to be more logical IMHO.
xenic wrote:There are no plans to ever change/update OS4 ARexx.
Too late, see http://forum.hyperion-entertainment.biz ... =14&t=3309.
Last edited by polluks on Sun Apr 23, 2017 10:47 pm, edited 1 time in total.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: ARexx "not not" bug

Post by broadblues »

polluks wrote:
broadblues wrote:But we don't have an implmentation of IBM Rexx we have an implemenation of ARexx, it's a seperate language, with different constructs, the time loss in dealing with brackets must be fairly trivial overall, especially when you will often end waiting for a command passed to a host via address to return.
However I have to write a bug report for Regina (http://regina-rexx.sourceforge.net) because its ARexx mode is not compatible.
The other way around seems to be more logical IMHO.
Well why does regina need bug report, if it supports both ~~0 and ~(~0) it's a superset of ARexx. No problem. How many rexx scripts actually run on both AmigaOS and AROS? Exact compatabilty would seem overkill, and if needed easily obtained by avoiding obscure edge cases in the syntax that stayed hidden for 30 years as you put it earlier :-)


I would guess modify Arexx's parser would be non trivial.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: ARexx "not not" bug

Post by zzd10h »

"~~ also works in Rexx on IBM mainframe."

yes.
Attachments
REXX_ZOS.png
(11.7 KiB) Downloaded 2 times
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
polluks
Posts: 55
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: ARexx "not not" bug

Post by polluks »

zzd10h wrote:yes.
Thanks. Indeed, it's rather academic.
BTW Regina has "options AREXX_SEMANTICS".
User avatar
polluks
Posts: 55
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: ARexx "not not" bug

Post by polluks »

Guess the result:

Code: Select all

say 10-1
say 10--1
say 10---1
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: ARexx "not not" bug

Post by broadblues »

polluks wrote:Guess the result:

Code: Select all

say 10-1
say 10--1
say 10---1
say 10+--1 is equally interesting
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: ARexx "not not" bug

Post by ssolie »

xenic wrote:...There are no plans to ever change/update OS4 ARexx.
Incorrect.
ExecSG Team Lead
Post Reply