the DO script processor SUMMARY OF FUNCTIONS START: DO [{ScriptFile} [{parameters}] [/e|/r]] TEXT VARIABLES: %{variable name}[({format option}{length})] NUMERIC VARIABLES %{variable name}({format}) SPECIAL VARIABLES {script} Full Path name of current script {date} current date ("MM/DD/YY") {time} current time ("HH:MM:DD"); {home} home directory. {X} cursor column position {Y} cursor row position RESERVED VARIABLES EDIT external editor to be used in place of DO's built in editor LIST external file lister other than LIST.COM SPECIAL CHARACTERS: ~{number} PARAMETER PASSING: [C:> | /]{script} {script01} {script02} . . . COMMENTS: *{Comment} STRING FUNCTIONS @cpy({string},{start},{length}) @del({string},{start},{length}) @ins({string},{target},{position}) @len({string}) @pos({string},{target}) @trim({string},{target},L|R|B) DATE AND TIME FUNCTIONS @date({DateString}) @time({TimeString}) @dtst({Days}) @tmst({seconds}) @day({DateString}) MISCELLANEOUS FUNCTIONS @math({calculation}) COMMANDS: /{command} {token1} "{token 2}" ... {token19} /ASK {variable} {Default} {Prompt} {maxlength} UC /BOX {left} {top} {right} {bottom} {fc} {hc} {heading} /FRAME {v} {h} {Lr} {ur} {ll} {ul} /CAL {Row} {Column} /CANCEL [ALL|ONE] /CD {directory} /CHAIN {path} {command line} /CLEAR [ALL|CURRENT|{variable}] /CLOCK {OFF|ON|STD} [{Row} {Column}] /CLOSE {handle} /CLOSECOM {Drop DTR} /CWAIT [{timeout}] /DEBUG [ON|OFF|FULL|MEM] /DELWAIT {{variable}|ALL} /DIAL {string} /DIR {pattern} {$[F|P|E]} /DISP[LAY][ {display parameters}] /DOCUMENT {ON|OFF} ![{flags};]{command} /DRAW,{V|H},{{row}|{col}},{start},{end}[,{speed}[,{character}]] /EDIT {filename} /ERASE {Filename} [n] /{ScriptName}[{parameter1}...] /ENDEXEC CLEAR /EXIST {Filename} /FLUSHCOM [{OUT|IN|BOTH}] /GD {variable} /GETC[HARACTER] {Prompt} {List} [{variable}] [LC] No {variable} stored in CHAR. /GOSUB {Label} {param01} {param02} . . . /GOTO {Label} [[{Default}] ASIS] /GOTOC {Prompt} {List}[ {variable}][ LC] No {variable} stored in CHAR. /HALT [{ReturnCode}] /IF({expression}) [[{else label}][ ASIS]] {expression} = {value} {operator} {value} Expressions can be separated by OR, AND /{INC|DEC} {variable}[ {value}] /INITCOM {port} {baud} [{parity} {data} {stop} {string}] /INKEY [{key}] [{label}] /LIST {filename} /LOOK {row} {column} {length} /MACROS {OFF|ON {macro file}} /MATH {Variable} {Formula} /MD {directory} [n] /OPEN {handle} {filename} {mode} [{extension}] [{label}] /PAGE {{-}line number} /PARSE[ "{parameters}"] /PASSWORD {filename} {pattern} {seed} /PAUSE {seconds} [{parameter1} ... {parameter18}] /PAGEPROMPT[ {Prompt}] /PRINT {FileName} /RD {directory} [N] /READ {handle} {delimiters} {variable} {variable} . . . /RENAME {Filename} {NewName} /REPEAT /UNTIL {value1} [EQ/LT/GT/NE/GE/LE/LK] {value}[[{else label}] /RETRIEVE on | off /RETURN /RETURNCODE [{code}] /SEND {string} /SETCOMDELAY {milli-seconds} /SETWAIT {variable} {string} /STOP [{label}] /SUBST {variable} {string} {target} {phrase} [{start}] /TERM {initstring} {x1} {y1} {x2} {y2} /VERSION /WALK {L|R} {row} {start} {line} {speed} /WRITE {handle}[ ["]{line}[&]["] DISPLAY CONTROL PARAMETERS: .{parameter 1} {parameter 2} .. {parameter 20} WI[NDOW] [{X Y X Y}|{FULL}] SP[EED] {millisecond delay} FAST CLICK QU[IET] C {foreground} {background} Black = 0 Blue = 1 Green = 2 Cyan = 3 Red = 4 Magenta = 5 Brown = 6 LightGray = 7 [#] DarkGray = 8 [gy] LightBlue = 9 [bl] LightGreen = 10 [gr] LightCyan = 11 [cy] LightRed = 12 [re] LightMagenta = 13 [ma] Yellow = 14 [ye] White = 15 [wh] + blink (before color) CLR BELL PAGE (PG) GO[TO] {column} {row} PA[USE] {seconds} RE[SET] STD is the same as C 7 0 QUIET FAST (it resets the default DO display parameters) BO is the equivalent of C 7 0 UL is the equivalent of C 1 0 # resets the display to C 7 0 (white on black) TYPE is the equivalent of SPEED 75 CLICK /IF Operators and Wildcard Characters EQ, = , == - {value1} equal to {value} LT, < - {value1} less than {value} GT, > - {value1} greater than {value} NE, <>, != - {value1} not equal to {value} GE, >= - {value1} greater than or equal to {value} LE, <= - {value1} less than or equal to {value} IN - {value1} appears in {value} LK - {value1} matches pattern in {value} NL - {value1} does not match the pattern in {value} ? = Any character # = Any integer \ = next character is literal * = any string of characters [] = Groups characters inclusive [~] = Groups characters exclusive U = Any uppercase letter L = any lower case letter @ = Any alphabetic character {|} = Groups of phrases > = Goto end of phrase /MATH Operators and Functions + Addition / Division - Subtraction ^ Exponentiation * Multiplication () Grouping ABS Returns the absolute value of the argument ATAN Returns the arctangent of the argument COS Returns the cosine of the argument EXP Returns the exponential LN Returns the natural logarithm of the argument ROUND Rounds a real number to an integer SIN Returns the sine of the argument SQRT Returns the square root of the argument SQR Returns the square of the argument TRUNC Truncates a real to an integer /PASSWORD Wildcard Characters ? = any character from the sets below $ = any alpha character (ABCDEFGHIJKLMNOPQRSTUVWXYZ) # = any numeric character (0123456789) % = any special character (!#$^&*()<>?+=) Interactive Mode Command Line Edit Keys Quit and clear line ........................... Beginning of line ............................. Left one character ............................ Right one character ........................... End of line ................................... Toggle insert mode (insert default) ........... Delete character under cursor ................. Left one word ................................. Right one word ................................ Delete to end of line ......................... Delete to beginning of line ................... Delete character to left of cursor ............ Execute Command ............................... Enter Control Character ....................... (next character will be entered as is) Restore original command ...................... Delete Word ................................... Delete command ................................ Built-in Editor Commands Character left or Character right or Word left or Word right or Line up or Line down or Scroll up Scroll down Page up or Page down or Beginning of file R or End of file C or Beginning of line S or End of line D or Top of screen E or Bottom of screen X or Top of block B Bottom of block K Jump to marker 0..3 0.. 3 Set market 0..3 0.. 3 Previous cursor position P New line or Insert line Insert control character {character} Tab or Delete current character or Delete character left or Delete word Delete to end of line Y Delete line Find F Find-and-replace A Find next Begin block B or End block K or Copy block C Move block V Delete block Y Hide block H Mark current word as block T Read block from file R Write block to file W Print block P Toggle insert mode or Toggle autoindent mode I Toggle fixed tabs T Restore Line L Exit editor (save file) D or or Quit editor (no save) Q Enter start- & end-parameter symbols (/E, /R only)