Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Rexx Beep function

/* Main program */ 
BEEP(1000,200)

Rexx Address

/* Main program */ 
say ADDRESS()

Rexx arg(index) subroutine

/* Main program */ 
call add 1,2 
exit 
add: 
PARSE ARG a,b 

say arg(1) 
c = a + b 
say c 

Rexx Argument subroutine

/* Main program */ 
call add 1,2 
exit 
add: 
PARSE ARG a,b 

say arg() 
c = a + b 
say c 

Rexx Subroutine Working with arguments

/* Main program */ 
call add 1,2 
exit 
add: 
PARSE ARG a,b 
c = a + b 
say c

Rexx Defining Subroutine

/* Main program */ 
call add 
exit 
add: 
a = 5 
b = 10 
c = a + b 
say c 

Rexx Recursive Function

/* Main program */ 
do n = 1 to 5 
say 'The factorial of' n 'is:' factorial( n ) 
end 
return  

/* Function to get factorial */ 
factorial : procedure 
n = arg(1) 
if n = 1 then 
return 1 
return n * factorial( n - 1 ) 

Rexx arg(index)

/* Main program */ 
say add(5,6) 
exit 
add: 
PARSE ARG a,b 

say arg(1) 
return a + b 

Rexx Working with Arguments

/* Main program */ 
say add(5,6) 
exit 
add: 
PARSE ARG a,b 

say arg() 
return a + b 

Rexx Defining a Function

/* Main program */ 
say add(5,6) 
exit 
add: 
PARSE ARG a,b 
return a + b 

Previous 1 ... 3 4 5 6 7 8 9 ... 11 Next
Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.