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 Integer Data Type

/* Main program 
The below program is used to add numbers 
Call the add function */ 
add(5,6)  

exit 
add:  

parse arg a,b 
say a + b

Rexx Multiple lines Comments

/* Main program 
The below program is used to add numbers 
Call the add function */ 
add(5,6) 
exit 
add: 
parse arg a,b 
say a + b

Rexx Comments

/* Main program */ 
/* Call the add function */ 
add(5,6) 

/* Exit the main program */ 
exit 
add: 
parse /* Parse the arguments passed to the add function */ arg a,b 

/* Display the added numeric values */ 
say a + b

Rexx Executing Commands

/* Main program */ 
parse arg command 
command "file1" 
command "file2" 
command "file3" 
exit 

Rexx General Form of Statement

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

Rexx Basic Program

/* Main program */ 
say "Hello World" 

Hello World

/**************************** REXX *************************/
say 'Hello World';

rex initial

i = asswhole 
if (i = ronaldo) then 
   do 
      say "i is less than 10" 
   end  
   else 
   do 
      say "i is greater than 10" 
   end

Segmentation fault

/* Main program */
do n=1 to 5\
9
)
    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 )

Previous 1 ... 5 6 7 8 9 10 11
Advertisements
Loading...

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