ARexx "not not" bug

A forum for general AmigaOS 4.x support questions that are not platform-specific

Re: ARexx "not not" bug

Postby broadblues » Sun Apr 23, 2017 1:59 pm

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.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: ARexx "not not" bug

Postby xenic » Sun Apr 23, 2017 4:29 pm

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
xenic
 
Posts: 1047
Joined: Sun Jun 19, 2011 1:06 am

Re: ARexx "not not" bug

Postby nbache » Sun Apr 23, 2017 10:19 pm

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
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: ARexx "not not" bug

Postby polluks » Sun Apr 23, 2017 11:34 pm

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 viewtopic.php?f=14&t=3309.
Last edited by polluks on Sun Apr 23, 2017 11:47 pm, edited 1 time in total.
User avatar
polluks
 
Posts: 16
Joined: Tue May 19, 2015 7:30 pm
Location: Germany

Re: ARexx "not not" bug

Postby broadblues » Mon Apr 24, 2017 12:38 am

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.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: ARexx "not not" bug

Postby zzd10h » Wed Apr 26, 2017 2:14 pm

"~~ 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
zzd10h
 
Posts: 544
Joined: Sun Sep 16, 2012 6:40 am
Location: France

Re: ARexx "not not" bug

Postby polluks » Thu Apr 27, 2017 12:09 am

zzd10h wrote:yes.

Thanks. Indeed, it's rather academic.
BTW Regina has "options AREXX_SEMANTICS".
User avatar
polluks
 
Posts: 16
Joined: Tue May 19, 2015 7:30 pm
Location: Germany

Re: ARexx "not not" bug

Postby polluks » Sat Apr 29, 2017 8:55 pm

Guess the result:
Code: Select all
say 10-1
say 10--1
say 10---1
User avatar
polluks
 
Posts: 16
Joined: Tue May 19, 2015 7:30 pm
Location: Germany

Re: ARexx "not not" bug

Postby broadblues » Sat Apr 29, 2017 9:19 pm

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
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: ARexx "not not" bug

Postby ssolie » Thu Jun 15, 2017 1:35 am

xenic wrote:...There are no plans to ever change/update OS4 ARexx.

Incorrect.
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1000
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada

PreviousNext

Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 4 guests

cron