English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System > Coders. Scripting

 
 
Thread Tools
Old 20 December 2023, 06:55   #101
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
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)
or use the CALL keyword
Code:
call Delay(15)
thomas is offline  
Old 20 December 2023, 08:18   #102
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Thank you Thomas, now it works

And thanks for the explanation, too. Although I've red the ARexx manual this information passed me by.
thyslo is offline  
Old 20 December 2023, 14:07   #103
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,304
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.
daxb is offline  
Old 21 December 2023, 06:14   #104
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Thanks, daxb, I'll have a look at that. I'm always interested in better readable code.
thyslo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:00.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09436 seconds with 14 queries