Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rexx Programming/How to Rexx/backslash

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The backslash character (\), an alternative to Not (¬), is a logical operator for a Boolean value. It represents negation. Many other programming languages use either an exclamation mark or the word "not" for the same purpose. It precedes a value of 0 or 1 to produce the other value. Backslash has the advantage that it is an ASCII character and thus not subject to the code page issue of not, e.g., X'AA' versus X'AC'. /* Boolean values are 0 and 1 */ false = 0 true = 1 /* Backslash means "not" */ say \ false /* same as: say true; same as: say ¬ false */ say \ true /* same as: say false */ The backslash can also be combined with loose and strict equality to produce "not equal" operators. /* Loose unequal says false (0) */ say 'ok ' \= 'ok' /* Strict unequal says true (1) */ say 'ok ' \== 'ok'