This command will give the compiler instructions that are necessary only during compilation of a program.
|#sac||Required - This is another form of the special alpha constant. It may or may not also have a numeric constant (value) as a part. The options are:|
ADD_FLDS - This is no longer needed and is ignored by the compiler. The internal field buffer will expand as necessary.
ALL_LOC - Specify that all fields defined are LOCAL. Still requires the PROC and ENDP compiler directives before this directive takes effect.
DONTCOMPILE - The program will cease attempting to compile this program and will continue with the next source file if you are compiling a group of files. This should be at or near the top of the source file and before any forms or reports are specified.
ENDP - Specifies the end of a Procedure that is started with the PROC directive. Used in connection with LOCAL
FMT - This tells the compiler that you have included screen/report forms in the TAS 3 style.
FORCERWN - The compiled programs in TAS Professional have the extension of .RWN and are 'true' Windows programs, just not compiled to .EXEs. Previous to this version the programs had the extension .RUN and very different characteristics. Any program that includes the WINFORM compiler directive is automatically compiled as a RWN program. However, there may be situations where you don't have a screen/form for a program and still want to create a RWN file. By including this compiler directive the compiler will create a RWN file.
FORMSENCRYPTED - In TAS Professional the forms are separate from the compiled program. This allows the user to make changes to the form, if desired, without having to modify the program. In some cases you may not want the user to be able to do this. If that is true, you would include this compiler directive and, following FORMSENCRYPTED you would include an alpha constant that would be used during the encryption process to lock up your forms. The longer the constant the better the encryption.
NOTE: Even if you give the encryption string to the user they still wouldn't be able to unencrypt the file due to protections in TAS Professional itself, and that we don't provide any way to unencrypt a file once it's encrypted.
NOTE: If you encrypt one form or report in the program then all must be encrypted. They will all use the same phrase. DO NOT put any spaces between the words or the characters in the encryption phrase.
INC - A named source file to be compiled and included in the run program. The difference between INC and LIB is that the file specified here is included completely in your final program, where only the parts needed are included from the LIB file.
INCX - Same as INC above, except the code has been encrypted. This will allow you to keep certain parts of your program secret while still giving the user enough code to make changes to their programs. Please refer to Encrypt File for more information about securing your source code.
LIB - Specify a library of commonly used routines. At the end of the compilation process if the compiler is still missing pieces it will look here. If an extension is not given for the library file name it is assumed to be '.LIB'. If no path is given it is assumed to be in the user's current directory.
NOTE: In previous versions you could put angle brackets (<>) around the library name and the compiler would look in the TAS Professional location for the library. That no longer works.
LIBX - Same as LIB above, except the code has been encrypted. This will allow you to keep certain parts of your program secret while still giving the user enough code to make changes to their programs. Please refer to Encrypt File for more information about securing your source code.
MAINMENU - If the program is to take the place of the default main menu in the runtime you would include this compiler directive. If there is already a program running that is effectively the main menu this directive will be ignored.
PROC - Alerts the compiler that all DEFINE fields from this point until the corresponding ENDP directive that have the LOCAL option set are available to this routine only. The routine is made up of the commands between the PROC and ENDP compiler directives. Without the PROC directive the LOCAL option will be ignored.
NOTE: If the ALL_LOC directive has been previously encountered then all DEFINEs until the next ENDP will automatically be set to LOCAL.
TDATA - Amount of temporary data to allocate for this program in bytes. This is the data used for calculations, etc. If you are doing large recursive calculations on alpha type fields you will want to increase this value. It defaults to 64k if you don't include this directive and, in most situations, that is plenty.
UDX - Both UDCs and UDFs are allowed.
WINFORM - This is the name of a Windows screen/form. Each form you load in a program has to have a separate line specifying the form name. The forms (.DFM & .DCY) should be in the same subdirectory as the source during compilation. The first WINFORM command in the program denotes the default form. This is the one loaded automatically when the program is run.
WINREPORT - This is the name of a Windows report form. The report form (.RTM & .RCY) should be in the same subdirectory as the source during compilation. This is not required for reports, however, if you use fields in your report that you don't use elsewhere in the program, you will get a "Field Not Found" error when the report is run if you don't include this directive in the program.
For more information on Compiler Directives please refer to Compiler Info.