(view source code of readline.rex as plain text)
/* Read a single line from standard input */
/* Rexx version of OS/2 Warp 4 COMMAND.COM's internal READLINE command */
/* Written by Rob van der Woude */
parse upper arg commandline
when commandline = "/V" then upcase = 1
when commandline = "" then nop
otherwise call Syntax
empty = 0
do i = 1 by 1 while lines( ) > 0
parse pull line
if i = 1 then do
if upcase = 1 then do
say translate( line )
if line = "" then empty = empty + 1
if empty > 100 then leave
say "Use the READLINE command to read a line of text from the"
say "keyboard and place it in the batch file variables to"
say "This command can only be used from within a batch file."
say "SYNTAX: READLINE [/V]"
say " /V converts the input line to upper case."
page last uploaded: 2021-01-27, 16:12