Small ARexx bug

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

Small ARexx bug

Postby polluks » Thu Jan 07, 2016 7:27 pm

Hi!
The third argument should prompt an error message
Code: Select all
rx "say word(foo,1,bar)"

Here comes a quick patch, just one byte will be changed
Code: Select all
0000: 464F524D 00000088 50544348 56455253 FORM....PTCHVERS
0010: 00000024 00000300 53415320 496E7374 ...$....SAS Inst
0020: 69747574 652C2049 6E632E20 50617463 itute, Inc. Patc
0030: 68205636 2E353000 494E5046 0000001C h V6.50.INPF....
0040: 002866C2 00008AD8 3A726578 78737973 .(f?...?:rexxsys
0050: 6C69622E 6C696272 61727900 4F555446 lib.library.OUTF
0060: 0000001A 002866B2 00008AD8 72657878 .....(f?...?rexx
0070: 7379736C 69622E6C 69627261 72795053 syslib.libraryPS
0080: 45510000 000A5571 9DA05519 3A000000 EQ....Uq.?U.:...

Have a nice day!
User avatar
polluks
 
Posts: 16
Joined: Tue May 19, 2015 7:30 pm
Location: Germany

Re: Small ARexx bug

Postby broadblues » Fri Jan 08, 2016 1:14 pm


9.AmigaOS4:> rx "say word(foo.1.bar)"
+++ Error 17 in line 1: Wrong number of arguments
Command returned 10/17: Wrong number of arguments

9.AmigaOS4:> version rexxsyslib.library full
rexxsyslib.library 53.4 (21/02/2013)
9.AmigaOS4:> version rx full
rx 52.1 (09/12/2006)


Seems to give an error message here.

What version are you using?
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Small ARexx bug

Postby polluks » Fri Jan 08, 2016 1:56 pm

Of course you don't use a comma, this is a single argument.
I have the same version.
User avatar
polluks
 
Posts: 16
Joined: Tue May 19, 2015 7:30 pm
Location: Germany

Re: Small ARexx bug

Postby nbache » Sat Jan 09, 2016 12:15 am

I can confirm your observation:

Code: Select all
$ rx "say word(foo, 1, bar)"
FOO
$ version rexxsyslib.library full
rexxsyslib.library 53.4 (21/02-2013)


But a patch of the binary isn't going to help get the issue solved in future versions.

Since you have been clever enough to work out how to patch it, you might explain what your patch achieves in a manner which makes it easy for an OS developer to change the source code accordingly.

I'm guessing you may have found something looking like a table defining the arity of the functions?

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Small ARexx bug

Postby polluks » Sat Jan 09, 2016 12:50 am

I see, the byte after the string "WORD" has to be $22 not $32 (exactly two arguments).

Bye!
User avatar
polluks
 
Posts: 16
Joined: Tue May 19, 2015 7:30 pm
Location: Germany

Re: Small ARexx bug

Postby nbache » Sat Jan 09, 2016 1:20 am

Yep, that's what I thought.

I'll make a BZ about it. Edit: Done.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark


Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 3 guests