Jump to content

Rexx Programming/How to Rexx/variable assignment

From Wikibooks, open books for an open world

To assign a number to a variable, we use the equal sign (=). The left side names the variable, and the right side contains a value or an expression, potentially including other variables.

x = 3
y = 5
z = x * y
/* z is now 15 */

It doesn't even just have to be numbers. Any string or valid expression is allowed.

greeting = "Hello"
audience = "world"
sentence = greeting"," audience"!"
say sentence