







TurboBAT
_______________________________________

Users Manual


















Version 3.00    BETA A    10/02/91


Copyright (c) 1991 Foley Hi-Tech Systems




License Agreement

This software is protected by both United States copyright law and
international treaty provisions. Therefore, you must treat this software
"just like a book," with the following single exception. Foley Hi-Tech
Systems authorizes you to make archival copies of the software for the
sole purpose of backing up our software and protecting your investment
from loss. By saying, "just like a book," Foley Hi-Tech Systems means
that this software may be used by any number of people and may be
freely moved from one computer location to another, provided there is
absolutely no possibility of it being used at one location at the same time
it is being used at another. Just as a book cannot be read by two
different people in two different places at the same time, the software
may not be used by two different people in two different places at the
same time.

You may not make copies of the software documentation or disk, except
as described above. You may not distribute, rent, sublicense, or lease
the software or the documentation. You may not alter, modify, or adapt
the software or documentation, including but not limited to translating,
decompiling, reverse assembling, or creating derivative works. You may
not use the software in a network, timesharing, multiple CPU, or multi-
user environment unless each user is licensed by Foley Hi-Tech
Systems.



Limited Warranty

In the event of notification of defects in material or workmanship, within
the warranty period of 45 days from the date of purchase, Foley Hi-Tech
Systems will, at its option, replace the defective diskette or refund the
license fee. If you need to return a product, call the Foley Hi-Tech
Systems Technical Support Service Department to obtain a return
authorization number. The remedy for breach of this warranty shall be
limited to replacement or refund and shall not encompass any other
damages, including but not limited to loss of profit, and special,
incidental, consequential, or other similar claims.

Foley Hi-Tech Systems specifically disclaims all other warranties,
expressed or implied, including but not limited to implied warranties of
merchantability and fitness for a particular purpose with respect to
defects in the diskette and documentation, and the program license
granted herein in particular, and without limiting operation of the program
license with respect to any particular application, use, or purpose. In no
event shall Foley Hi-Tech Systems be liable for any loss of profit or any
other commercial damage, including but not limited to special, incidental,
consequential, or other damages. This statement shall be construed,
interpreted, and governed by the laws of the State of California.

Trademark Information

Safety Disk is a trademark of Foley Hi-Tech Systems.
MS-DOS is a trademark of Microsoft Corporation.




TURBOBAT - Turbo Batch File Compiler
___________________________________________________________


Description

TurboBat allows you to compile standard DOS batch files into .COM
binary programs.  This will greatly enhance the speed of large batch files
by allowing them to run in native code rather than interpreted DOS
commands. The resulting .COM files may call nested batch files without
loosing the parent since the parent calling program is now no longer a
batch file.


Version

3.00  10/02/91


Command Format

TURBOBAT [filename.BAT] [/I]


Options

/I      ignore labels that don't start with a letter.  This is handy if you use
        the : as a comment field holder in some places.



TURBOBAT - Turbo Batch File Compiler
___________________________________________________________


Notes

The output will be filename.COM.

Some instances of BATCH files that modify the ENVIRONMENT will not
work properly.  If you notice this behavior please EMAIL us a note on
CompuServe or our BBS so that we can notify you when we fix this
problem.  We are currently working on it and should have a solution
soon.



BETA RELEASE NOTES


This version is a major revision of the 2.xx series of TurboBat.  Amongst
other things, TurboBat has been rewritten in Turbo Pascal to make the next
phase of feature additions quicker and simpler while reducing many of our
previous bugs.  This version is still under development and if you wish to
register it be assured that your order will not be placed until testing has
been completed and the new version is fully functional.  We are offering
this premature release so that users may have feedback to our testing cycle and
offer suggestions for new features.  If you have any troubles or requests for
enhancements please contact as:

Foley Hi-Tech Systems
172 Amber Drive
San Francisco, CA 94131
(415) 826-1706 FAX
(415) 826-1707 BBS
70262,1463 CompuServe

Please do not try calling voice as we will just have to take a message as our
programmers are busy working on the product.  Leaving a FAX or email is the
easiest way to insure your message will get through.


==============================================================================



The following enhancements have been added to TurboBat:



  IF and ERRORLEVEL comparison choices:

    ==  =  equal
    EQ  =  equal
    NE  =  not equal
    LT  =  less than
    LE  =  less than or equal
    GT  =  Greater than
    GE  =  Greater than or equal


    Examples:

    REM test if the first is smaller than the second
      IF %A% LT %B% GOTO smaller

    REM check the exact value of the errorlevel
      IF ERRORLEVEL EQ 0 GOTO CONTINUE
      IF ERRORLEVEL EQ 99 GOTO FATAL








  GOSUB/RETURN:

     Calls a label in the same batch file as a subroutine.

     Examples:

         GOSUB parse
         SHIFT
         GOSUB parse
         ...etc.
         :PARSE
         ...etc.
         RETURN

     If there are no pending subroutine calls the RETURN statement
     will terminate the current batch file.





   QUIT

     Terminates the current batch file.  Removes the necessity of
     jumping to the end of the batch file.







Bug fixes:

  - No longer matches partial environment variable names


  - Filenames from FOR loops are now correctly passed.

  - ECHO now properly behaves properly when followed by a ':' or '.'

  - Filename parsing problem when redirection is in effect no
    longer causing a problem.

  - Redirection on same line as GOTO or GOSUB will produce a
    compiler error.

  - Append redirection (e.g. >>test.fil) will create the file if it
    does not exist.




UPCOMING FEATURES

We are currently adding support for as many of the 4DOS batch file
enchancement commands as we can as well as support for Norton BE commands.
As these features are added we'll be documenting them in the release notes.











1. Current, the FOR looping variable can only be referenenced on
   the same line as the FOR statement.  The change I have in mind
   would allow greater flexibility, primarily with the GOSUB
   command:

        FOR %%A IN (*.PAS) DO GOSUB DOIT
        QUIT
        :DOIT
        ECHO %%A

  The above example simply displays the filename, but you should
  get the idea.

2. Include a switch for "compatibility" mode.  Any attempt to
   compile enhancements to the standard batch file capability
   will produce an error message.  One idea is to only allow
   enhancements if the file extension is ".TB".
