![]() |
![]() |
#101 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,051
|
That's how Rexx works. Every value without context is sent to the current ARexx host. If it encounters a function call without context, it executes the function and sends the result to the host. If you don't want the result to be processed as a host command, you have to put it into a context.
For example assign the return value to a variable Code:
x = Delay(15) Code:
call Delay(15) |
![]() |
![]() |
#102 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 201
|
Thank you Thomas, now it works
![]() And thanks for the explanation, too. Although I've red the ARexx manual this information passed me by. |
![]() |
![]() |
#103 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,326
|
IMHO it would be better to use "waitforport" instead of the delay() loop. You also get shorter code. See ARexxGuide2 for an how to use example.
|
![]() |
![]() |
#104 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 201
|
Thanks, daxb, I'll have a look at that. I'm always interested in better readable code.
|
![]() |
![]() |
#105 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 201
|
While creating some scripts for GoldED I encountered some questions about ARexx strings & parsing. Maybe somebody here can help.
1) Is there a operation to access the character of a string by index? For example I tried Code:
s = 'Abc' char = s[0] 2) If char would contain 'A' is there a way/function to get the ascii code of it? Something like Code:
say asc(char) 65 Code:
'*** CALLxxDOS PutStr' Tried it with: Code:
parse var line '*** ' err_context err_context = STRIP(err_context) So, how can the TAB character be parsed? |
![]() |
![]() |
#106 | |
Global Moderator
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,594
|
Quote:
|
|
![]() |
![]() |
#107 | ||
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,051
|
Try c2d(char) or c2x(char) as you like.
Quote:
Code:
parse value translate(line,' ','09'x) with '***' err_context Quote:
|
||
![]() |
![]() |
#108 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 201
|
Thank you, thomas, this works great:-)
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AmigaDOS scripting resources | Photon | Coders. System | 26 | 19 March 2018 14:51 |
Very Basic Scripting. Confused. | marduk_kurios | Coders. System | 5 | 06 February 2014 11:13 |
UAE Scripting Layer | FrodeSolheim | support.FS-UAE | 15 | 26 January 2014 15:56 |
C= 64 BASIC as a Scripting Language | Charlie | Retrogaming General Discussion | 2 | 17 November 2008 14:23 |
|
|