Difference between revisions of "The Script Programming Language/Using SC"

From SCI Wiki
Jump to navigationJump to search
(Created page with "==<br /> Using SC == The sc compiler is invoked with the command <blockquote> <div class="CodeBlockHeader">Code:</div> <syntaxhighlight lang="sci"> sc file_spec [file_spec]...")
 
Line 1: Line 1:
 +
[[The Original SCI Documentation]]<br />
 +
 +
<div align="center"><span style="font-size: 22pt">The Script Programming Language</span><br />
 +
<span style="font-size: 22pt">Using SC</span><br />
 +
''Author: [[Jeff Stephenson]]''</div>
 +
 +
&nbsp;
 +
 
==<br /> Using SC ==
 
==<br /> Using SC ==
  
Line 28: Line 36:
 
====<br /> -z ====
 
====<br /> -z ====
 
<blockquote>Turn off optimization. Not a particularly useful option except for those of us who must maintain the compiler.</blockquote>
 
<blockquote>Turn off optimization. Not a particularly useful option except for those of us who must maintain the compiler.</blockquote>
 +
 +
&nbsp;
 +
 +
;Notes
 +
<references />
 +
 +
&nbsp;
 +
 +
[[The Script Programming Language | Table of Contents]]
 +
 +
&nbsp;
 +
 +
<span style="float: left">[[The Script Programming Language/Procedures | &lt; Previous: Procedures]]</span><span style="float: right"><span class="Inactive">Next:  &gt;</span></span>
 +
 +
&nbsp;
 +
 +
[[Category:SCI Documentation]]

Revision as of 19:10, 29 November 2015

The Original SCI Documentation

The Script Programming Language

Using SC

Author: Jeff Stephenson

 


Using SC

The sc compiler is invoked with the command

Code:
sc file_spec [file_spec] [options]

Any number of file specifications may be entered on the command line, and a file specification may include wild-card names.


Options


-l

Generate an assembly language code listing for the file. This is useful when using the built-in debugger of sci, which lists only the assembly language code, not the source. When compiling filename.sc, the list file is named filename.sl


-n

Turns off 'auto-naming' of objects. As described in Script Classes for Adventure Games, each object has a name, or 'print-string' property, which is how to represent the object textually. Unless the property is explicitly set, the compiler will generate the value for this property automatically, using the object's symbol string for the name. The object names, however, take up space in the heap. While they are useful (almost vital) for debugging, if you're running out of heap in a room, it might help to compile with the -n option to leave the names out.


-oout-dir

Set the directory for the output file (script.nnn) to out-dir.


-v

Turns on verbose mode, which prints the number of bytes occupied by various parts of the output file (code, objects, text, etc.).


-z

Turn off optimization. Not a particularly useful option except for those of us who must maintain the compiler.

 

Notes


 

Table of Contents

 

< Previous: ProceduresNext: >