Skip to main content

  | मौसम…

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

411 REFERENCE · Wikibooks

Rexx Programming/Example Code

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

Hello World: Code: Say "Hello World" Output: Hello World Uniq: Usage: uniq < filename or cat filename | uniq Shows that stem variables may be indexed by strings as well as numbers. I use it as an improved version of the unix 'uniq' program. Code: /* Show only one copy of each line in a whole file */ seen. = 0 /* a stem variable */ Do While Lines() > 0 /* read input lines until no more */ Parse Pull this_line /* get a line */   If seen.this_line Then Iterate /* use the line as an index, and if seen (value of 1), loop to get next line */   Say this_line /* If it's a previously unseen line, indicate we've now seen it */ end