/* 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 select when commandline = "/V" then upcase = 1 when commandline = "" then nop otherwise call Syntax end 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 ) end else do say line end end if line = "" then empty = empty + 1 if empty > 100 then leave end EXIT 0 Syntax: procedure say 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 say "SYNTAX: READLINE [/V]" say say "where:" say " /V converts the input line to upper case." EXIT 1 return