scc: Compiling a Sculptor program


scc progname[.f | .r] [-Dsymbol[=text]] [-dehinqs] [-w=warn_level]

Once a Sculptor program has been written, it must be compiled. The Sculptor compiler is called scc.


The name of the source file, which bears a .f or .r extension. The .r extension is used for files containing !report sections. If the program has a .f extension, inclusion of the extension in the scc command line is optional. A .r extension must always be included.


Compiler flags to the compiler.

The compiler works in the following way:


Any replacement of manifest constants is performed.


The declarations and commands are compiled into a form which can be understood by the interpreter, sagewc | srepwc. The code compiled includes any external code specified by !include declarations, and respects the inclusion or exclusion of blocks of code within !if[n]def constructs.

If the program compiles successfully, it produces an object file which can be interpreted by sagewc | srepwc at run time. This object file has the same name as the source file, except that the extension is changed, as summarised below:

Source code file

Object code file

Executed by

Screen form program



sagewc progname

Report program



srepwc progname

Sculptor object code is operating-system independent. This means that a compiled program is fully portable to any other machine and operating system which supports Sculptor.

If the program fails to compile, the error or errors encountered are listed on the screen. Any existing object file resulting from a previous successful compilation remains unchanged.


Programs using pixel positioning must be compiled using scc version 5.0 Beta 4 or later. All earlier versions of the compiler assume a character grid. See Pixel and character positioning.

Compiler flags

The command line may optionally be given a flag or flags which affect how scc operates. These are as follows:


Define the manifest constant symbol. If the optional text is specified, the manifest constant is given that value. All occurrences of symbol within the source file will be replaced by text. If text is not specified the manifest constant is defined, but with a null value. Note that this entire flag construction may not contain any spaces, as a space denotes the start of the next command line flag. The text must therefore be a single word.


Add debug information to the object file (.g | .q extension). The program may then be run by the Sculptor debug program scdebug , which allows source code to be viewed as the program runs. Other features include single stepping of commands, breakpoints, and examination of variable values and of the function stack.


Output error messages to a file progname.e (the source file name with a .e extension).


Display these options on the screen. No further action is taken.


Since Sculptor version 6.1.0 this option makes !include and ![o]file relative to the including file directory (no matter where we are compiling from)


Suppress string optimisation. With string optimisation, repeated instances of the same text string are noted and the string as a whole is stored only once. This produces a smaller object code file, but the compilation takes longer. Suppressing string optimisation speeds compilation, but the object code file is larger. A sensible approach is to suppress optimisation while a program is being developed and tested, and once the code is complete to optimise it.


Suppress header messages; display compilation errors only.


Suppress error messages.


Select the warning level. warn_level must be an integer in the range 0-3. These values have the following meanings:


Show all warnings (the default)


Show warnings of levels 1 and 2


Show warnings of level 2.


Show no warnings at all.


Running a Sculptor screen form program

Running a Sculptor report program

Sculptor filename conventions

The Sculptor program suite