The APT preprocessor performs two functions:  synonym replacement and file insertion.  The preprocessor is a Windows console application.  The command line syntax is:

prep[.exe] source_file_path

where [.exe] is optional.  The result of the preprocessing is sent to STDOUT, so to redirect the output to a file use the following syntax:

prep[.exe] source_file_path 1> output_file_path

The output file may then be compiled by the APT compiler.


Synonym Replacement


The APT command SYN allows the part programmer to rename other APT vocabulary words.  The general form is:

SYN/NewWord,VocabularyWord [ ,NewWord,VocabularyWord [ ,... ] ]

or

SYN/VocabularyWord,NewWord [ ,VocabularyWord,NewWord [ ,... ] ]

For example:  SYN/PT, POINT, LI, LINE  or  SYN/POINT, PT, LINE, LI

Note that once the ordering of NewWord and VocabularyWord is established then that ordering must be maintained throughout the entire list.  All synonyms must be defined before they are used.

The following is a sample of commonly used synonyms:

SYN/ AA,ATANGL,  CA,CANON,     CE,CENTER,  CI,CIRCLE,       CY,CYLNDR,   DC,DNTCUT, $
         FR,FEDRAT,   GB,GOBACK,  GD,GODLTA,  GF,GOFWD,    GL,GOLFT,      GR,GORGT,  $
         GT,GOTO,        IP,INDIRP,         IV,INDIRV,        IO,INTOF,          LF,LEFT,         LI,LINE,   $
         MX,MATRIX,   OB,OBTAIN,      PA,PARLEL,   PD,PENDWN,  PU,PENUP,    PP,PERPTO, $
         PL,PLANE,     PT,POINT,         RA,RADIUS,    RT,RIGHT,         TT,TANTO,      TH,THICK,  $
         TA,TLAXIS,     TL,TLLFT,         TN,TLON,         TR,TLRGT,        VE,VECTOR,  XL,XLARGE, $
         XS,XSMALL,  YL,YLARGE,     YS,YSMALL,    ZL,ZLARGE,     ZS,ZSMALL,   RP,RAPID

The single SYN statement above may also be split into multiple statements as below:

SYN/ AA,ATANGL, CA,CANON,  CE,CENTER, CI,CIRCLE, CY,CYLNDR, DC,DNTCUT
SYN/ FR,FEDRAT, GB,GOBACK, GD,GODLTA, GF,GOFWD,  GL,GOLFT,  GR,GORGT
SYN/ GT,GOTO,   IP,INDIRP, IV,INDIRV, IO,INTOF,  LF,LEFT,   LI,LINE
SYN/ MX,MATRIX, OB,OBTAIN, PA,PARLEL, PD,PENDWN, PU,PENUP,  PP,PERPTO
SYN/ PL,PLANE,  PT,POINT,  RA,RADIUS, RT,RIGHT,  TT,TANTO,  TH,THICK
SYN/ TA,TLAXIS, TL,TLLFT,  TN,TLON,   TR,TLRGT,  VE,VECTOR, XL,XLARGE
SYN/ XS,XSMALL, YL,YLARGE, YS,YSMALL, ZL,ZLARGE, ZS,ZSMALL, RP,RAPID


File Insertion

This feature allows the part programmer to insert the contents of other APT source files into the current source file.  For example:

#INCLUDE MACROS\SPIRLF.MACRO

In the example the contents of the file located in the subdirectory "MACROS" of the current directory and with the name "SPIRLF.MACRO" is inserted at the source code line at which it is located.