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 Do until loop

/* Main program */ 
j = 1 

do until (j <= 10) 
   say j 
   j = j + 1 
end

Rexx Do while loop

/* Main program */ 
j = 1 

do while(j <= 10) 
   say j 
   j = j + 1 
end

Rexx Do loop

/* Main program */ 
do 5 
   say "hello" 
end 

Rexx Control Repetition

/* Main program */ 
do i = 0 to 5 by 2 
   say "hello" 
end 

Rexx Two Dimensional array

/* Main program */ 
list.1 = 10 
list.1.1 = 11 
list.1.2 = 12 

say list.1 
say list.1.1 
say list.1.2 

Rexx Iterating Through Array

/* Main program */ 
list.1 = 10 
list.2 = 20 
list.3 = 30 

number_of_elements = 3 
do j = 1 to number_of_elements 
say list.j 
end 

Rexx Copying Array

/* Main program */ 
list.1 = 0 
list.2 = 0 
list.3 = 0 

/* Assigning new values to the array*/ 
list.1 = 10 
list.3 = 30 
listnew. = list. 

say listnew.1 
say listnew.2 
say listnew.3 

Rexx Displaying Values of an Array

/* Main program */ 
list.1 = 0 
list.2 = 0 
list.3 = 0 

/* Assigning new values to the array*/ 
list.1 = 10 
list.3 = 30 
say list.1 
say list.2 
say list.3 

Rexx Bitwise Operator

/* Main program */ 
a = 21 
b = 347 

Say c2b(a) 
Say c2b(b) 
Say c2b(bitand(a,b)) 
Say c2b(bitor(a,b)) 
Say c2b(bitxor(a,b)) 
Exit 

c2b: return x2b(c2x(arg(1)))

Rexx Logical Operator

/* Main program*/ 
say 1 & 0 
say 1 | 0 
say 1 && 0 
say \1

Advertisements
Loading...

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