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 Relational Operator

/* Main program*/ 
X = 3 
Y = 2 

say X > Y 
say X < Y 
say X >= Y 
say X <= Y 
say X == Y

Rexx Arithmetic Operator

/* Main program*/ 
X = 40 
Y = 50 

Res1 = X + Y 
Res2 = X - Y 
Res3 = X * Y 
Res4 = X / Y 
Res5 = X % Y 
Res6 = X // Y 

say Res1 
say Res2 
say Res3 
say Res4 
say Res5 
say Res6 

Rexx Printing Variables

/* Main program */ 
X = 40 

/* Display an Integer */ 
say X 
Y = 50.5 

/* Display a Float */ 
say Y 
Z = "hello" 

/* Display a string */ 
say Z 

Rexx Variable assigned value

/* Main program */ 
X = 40 
X = 50 
say X 

Rexx Naming Variable

/* Main program */ 
unassignedvalue 
say unassignedvalue 

Rexx Variable Declaration

/* Main program */ 
X = 40 
Y = 50 
Result = X + Y 
say Result

Rexx String Data Type

/* Main program */ 
display("hello")  

exit 
display:  

parse arg a 
say a

Rexx Float Data type

/* Main program 
The below program is used to add numbers 
Call the add function */ 
add(12E2,14E4)  

exit 
add:  

parse arg a,b 
say a + b

Rexx Decimal Data type

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

exit 
add:  

parse arg a,b 
say a + b 

Rexx Big Integer

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

exit 
add:  

parse arg a,b 
say a + b

Advertisements
Loading...

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