


                                                                    SIMC(1)



     NAME
          simc - SIMSCRIPT II.5 compiler

     SYNOPSIS
          simc [-cdlpvwx1CGOSX] [-L lines.v ] [-o executable ] source file
          [...]

     DESCRIPTION
          Simc is the UNIX SIMSCRIPT II.5 compiler developed and distri-
          buted by CACI Products Company.  Arguments consist of (optional)
          compiler options, followed by the names of one or more source
          files.

          Compiled output is produced corresponding to the compiler options
          selected, as discussed below.  Error messages, or warnings about
          questionable constructs, will be displayed on the standard error
          file (stderr), which is normally the user's terminal.  These
          diagnostics will also be included in the program source listing,
          if one is selected with the -l option.

          SIMSCRIPT II.5 programs must be stored in one or more files whose
          names end with `.sim'.  When compiling a SIMSCRIPT program with
          the simc command, the first file should contain a valid SIMSCRIPT
          PREAMBLE.  If the PREAMBLE is not the first source file, then a
          null PREAMBLE is assumed.

          The following options have meanings similar to the same options
          in cc(1).  See ld(1) for linker options.

          -c   Suppress linking and produce a `.o' file with the same name
               as each source file.

          -O   Instruct the C compiler to optimize the C language inter-
               mediate file.

          -o exefile
               Name the executable (linked) program file exefile instead of
               `a.out'.  Not meaningful with -c or -S options.

          -p   Instruct the C compiler and linker to generate an executable
               with profiling code built in.  See cc(1) for details.

          -pg  Pass the -pg flag to cc.  (not available on all systems)

          -S   Compile the named programs, and leave the intermediate
               language output (in this case, C) in a file with a `.c' suf-
               fix (no `.o' is created).  See also the -a option.

          -w   Suppress all warning messages.



                                                                          1






     SIMC(1)


          The following options are peculiar to simc:

          -a   As the -S option, except that an object file is created, and
               the intermediate language output contains the SIMSCRIPT
               source statements as comments.

          -C   Compile code to check that temporary entities references are
               correct, and verify that subscripts are within reserved
               array bounds.  Implies the -g option.

          -C0  Same as the -C option, but do not check the entity class,
               just its size.  This is for compatibility with older com-
               pilers that didn't support entity class checking.

          -d   Compile for debugging. Allows single-stepping, breakpoints
	       and to see local variables. You must compile the Preamble 
	       with "-d" or "-g" to see global variables and entities.

          -g   Compile for traceback. Allows to see all local variables,
	       but no single-stepping or breakpoints.

          -G   Link a SIMGRAPHICS II program using simgld.  This option is
               only available on systems with SIMGRAPHICS.

          -L lines.v
               Specify the number of lines, lines.v, per page.  Implies the
               -l option.  The default is 55 lines per page.

          -l   Make a formatted program listing during translation to the
               standard output file, including compiler diagnostics.

          -temp=(dir)
               Specify the directory that compiler temporaries will reside
               in.  The default, /tmp, should be appropriate for most
               sites.

          -v   Don't generate any PREAMBLE routines.  This is most often
               used to recompile a single source file that is part of a
               much larger model.  In this case, the PREAMBLE routines have
               already been generated, and only the declarations in the
               PREAMBLE are needed.

          -x   Output a local cross-reference listing for each routine.

          -X   Output a global cross-reference listing for the entire pro-
               gram.

          -1   Do not generate any code, only check the syntax.

          If more than one compilation is used to build a SIMSCRIPT pro-
          gram, then the -c option should be used to inhibit linking. The
          program should then be linked with either simc or simld as shown:
               simc [-o EXENAME] OBJFILES
              or
               simld [-o EXENAME] OBJFILES

          Unlike some UNIX compilers, simc does not pass unrecognized
          options or file names to the linker. If you wish to invoke linker
          options, or merge compiled SIMSCRIPT programs with routines writ-
          ten in other languages, you should use an explicit simld command
          to link your program.


     2






                                                                    SIMC(1)



     FILES
          file.sim                input file
          file.c                  intermediate source output
          file.o                  object file
          a.out                   executable output
          /tmp/Sim*               compiler temporaries
          /usr/bin/simc           SIMSCRIPT compiler
          /usr/bin/simcomp        SIMSCRIPT cc command
          /usr/bin/simld          SIMSCRIPT ld command
          /usr/bin/simgld         SIMSCRIPT graphics ld command
          /usr/bin/simtran        SIMSCRIPT parser
          /usr/lib/libsim.a       SIMSCRIPT support library
          /usr/lib/libsimg.a      SIMGRAPHICS support library

     SEE ALSO
          cc(1), ld(1)

          UNIX SIMSCRIPT II.5 User's Manual,
          Building Simulation Models with SIMSCRIPT II.5
          SIMSCRIPT II.5 Programming Language
          SIMSCRIPT II.5 Reference Handbook
         

     DIAGNOSTICS
          The diagnostics produced by simc itself are intended to be self-
          explanatory.  Occasional messages may be produced by the linker.
          Any messages from the C compiler are considered to be bugs in the
          compiler; please notify CACI.

     TECHNICAL SUPPORT
          Technical Support
          CACI Products Company
          3333 North Torrey Pines Court, La Jolla, CA 92037
               (619) 824-5200           (Front desk)
          Lab: (619) 824-5204           (Technical Support)
          FAX: (619) 458-0031
          email: support@caciasl.com

     NOTES
          Messages are given both to standard error and, if a source list-
          ing is requested, to standard output.  If the output for simc is
          not redirected, these messages will appear twice on the user's
          terminal.









                                                                          3



