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 ........................... <ctrl-break> <esc>
    Beginning of line ............................. <home> <ctrl-q><ctrl-s>
    Left one character ............................ <left arrow> <ctrl-s>
    Right one character ........................... <right arrow> <ctrl-d>
    End of line ................................... <end>
    Toggle insert mode (insert default) ........... <ins>
    Delete character under cursor ................. <del> <ctrl-g>
    Left one word ................................. <ctrl-left arrow>
    Right one word ................................ <ctrl-right arrow> <ctrl-f>
    Delete to end of line ......................... <ctrl-end> <ctrl-q><ctrl-y>
    Delete to beginning of line ................... <ctrl-home>
    Delete character to left of cursor ............ <backspace> <ctrl-h>
    Execute Command ............................... <enter> <ctrl-m>
                                                    <ctrl-q><ctrl-d>
    Enter Control Character ....................... <ctrl-p>
     (next character will be entered as is)
    Restore original command ...................... <ctrl-r> <ctrl-q><ctrl-l>
    Delete Word ................................... <ctrl-t>
    Delete command ................................ <ctrl-x> <ctrl-y>

Built-in Editor Commands

    Character left                     <Ctrl-S> or <Left Arrow>
    Character right                    <Ctrl-D> or <Right Arrow>
    Word left                          <Ctrl-A> or <Ctrl-Left Arrow>
    Word right                         <Ctrl-F> or <Ctrl-Right Arrow>
    Line up                            <Ctrl-E> or <Up Arrow>
    Line down                          <Ctrl-X> or <Down Arrow>
    Scroll up                          <Ctrl-W>
    Scroll down                        <Ctrl-Z>
    Page up                            <Ctrl-R> or <PgUp>
    Page down                          <Ctrl-C> or <PgDn>
    Beginning of file                  <Ctrl-Q> R or <Ctrl-PgUp>
    End of file                        <Ctrl-Q> C or <Ctrl-PgDn>
    Beginning of line                  <Ctrl-Q> S or <Home>
    End of line                        <Ctrl-Q> D or <End>
    Top of screen                      <Ctrl-Q> E or <Ctrl-Home>
    Bottom of screen                   <Ctrl-Q> X or <Ctrl-End>
    Top of block                       <Ctrl-Q> B
    Bottom of block                    <Ctrl-Q> K
    Jump to marker 0..3                <Ctrl-Q> 0..<Ctrl-Q> 3
    Set market 0..3                    <Ctrl-K> 0..<Ctrl-K> 3
    Previous cursor position           <Ctrl-Q> P
    New line                           <Ctrl-M> or <Enter>
    Insert line                        <Ctrl-N>
    Insert control character           <Ctrl-P> {character}
    Tab                                <Ctrl-I> or <Tab>
    Delete current character           <Ctrl-G> or <Del>
    Delete character left              <Ctrl-H> or <Backspace>
    Delete word                        <Ctrl-T>
    Delete to end of line              <Ctrl-Q> Y
    Delete line                        <Ctrl-Y>
    Find                               <Ctrl-Q> F
    Find-and-replace                   <Ctrl-Q> A
    Find next                          <Ctrl-L>
    Begin block                        <Ctrl-K> B or <F7>
    End block                          <Ctrl-K> K or <F8>
    Copy block                         <Ctrl-K> C
    Move block                         <Ctrl-K> V
    Delete block                       <Ctrl-K> Y
    Hide block                         <Ctrl-K> H
    Mark current word as block         <Ctrl-K> T
    Read block from file               <Ctrl-K> R
    Write block to file                <Ctrl-K> W
    Print block                        <Ctrl-K> P
    Toggle insert mode                 <Ctrl-V> or <Ins>
    Toggle autoindent mode             <Ctrl-O> I
    Toggle fixed tabs                  <Ctrl-O> T
    Restore Line                       <Ctrl-Q> L
    Exit editor (save file)            <Ctrl-K> D or <Alt-X> or <F10>
    Quit editor (no save)              <Ctrl-K> Q

    Enter start- & end-parameter
    symbols (/E, /R only)              <F1>
