Back | Next Lesson

Compiling & Archiving Basics

Re-open the file (hello.ff) from lesson #002 or open any text editor and retype it:

001     /* hello.ff     sc      03.15.2000      ARRIS v7.1
002     //hello
003     level 1u
004     ! ' Hello World '
005     
006     exit

Save the file as "hello.ff" in your ARRIS home directory (if in Windows, see ADE's 'Working Directory' section below for more accurate info).

Compiling

Compiling converts your Sigmac into a faster condensed (00100111010) language (gg).  Compiling has a definite speed advantage over interpreted 'macro' languages.

In MS Windows, Sigma's ADE requires some initial setup:
Once defined, you won't have to redefine it next time you open ADE, these parameters are saved in the "ade.ini" in the working directory.

Once ADE is initially setup, open the "hello.ff" and hit [c] button (see the use of [rc] below), it will compile.

Tip: When the ADE compiles, it doesn't compile the code in the ADE's editor window, it compiles the last saved version of it on the harddisk.  If you are using the ADE editor to write code, remember to save prior to compiling.  The above tip works for you if you use a non-ADE editor for writing.  I use Lemmy (a Windows VI editor) to write code, open ADE and then open the same sigmac file in the ADE Editor, minimize it, and compile it over and over again without touching it in the ADE editor.  Caution:  If you inadvertently hit the [Save] in the ADE, overwriting the sigmac file on the hard disk with the ADE's out-of-date version - just go back to Lemmy (or what ever) and resave the current version over top again.
In UNIX, from the command line:
% compile  hello.ff             <cr>

If successful, it will produce a "hello.gg" file.
We'll discuss compiling options and errors in more detail later on (oh what fun!). 

Archiving

Archiving places your sigmac (compiled gg version) into a sigmac library (sm).  In ARRIS, you don't load a single sigmac, but rather a library of sigmacs.  Two sigmac libraries will load automatically when ARRIS initiates, "file.sm" and "user.sm".

In MS Windows, archiving is handled in the ADE via the [rc] button - it will compile and archive in one step.  If you get a page load of compiling errors and they quickly scroll by, you may want to compile only via the [c] button.

In UNIX,
% smar  r  test.sm  hello.gg    <cr>

where smar is the command name and " r " is the argument to specify archive, next comes the sigmac library name, and the a list (separated by spaces) of compiled gg files (you may use *.gg).
Load Sigmac Library

Return to ARRIS and type:
smf; test.sm    <cr>
The ARRIS command smf will load a sigmac library

Execute Your Sigmac

In ARRIS, type:
hello   <cr>
sit back and watch the excitement pile up.

Anytime any modification is made to the source file (ff), you must repeat all these steps for the changes to take affect.

These first 3 lessons should be enough to see something happen, try writing other simple sigmacs - chaining together commands.  Next week, "Storing Data Using Variables".


That's all for now,
Steve


This lesson was brought to you by SCG consulting. All written materials related to these Sigmac lessons are copyrighted by SCG and intended for personal use only. Any commercial or non-commercial reproduction for public use is prohibited without written consent from SCG.

Back | Next Lesson