: relational operator

The : (colon) relational operator concatenates strings in an assignment statement or, when the : displays at the end of a print or crt expression, suppresses the automatic CR/LF combination, thus holding the current print/display position. It is also used as a token within the input @ statement.


exp : exp
print exp{:}
input @(x,y): var...
crt exp{:}


Variable z is assigned the result of the string expression, "Amount due = " concatenated to the value of the variable amount.

z = "Amount due = ":amount
print z

The string "Enter command " is printed and the cursor is left at the end of the string.

print "Enter command ":