Script Programming Language/Using SC: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
m 2 revisions imported
Andrew Branscom (talk | contribs)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[The Original SCI Documentation]]<br />
[[Category:SCI Pages]]
 
[[Official SCI Documentation]]<br />
[[Script Programming Language | Table of Contents]]
&nbsp;
<div align="center">
<div align="center">
Chapter:  
Chapter:  
[[The Script Programming Language/Introduction|1]] |  
[[Script Programming Language/Introduction|1]] |  
[[The Script Programming Language/Files|2]] |  
[[Script Programming Language/Files|2]] |  
[[The Script Programming Language/Definitions|3]] |  
[[Script Programming Language/Definitions|3]] |  
[[The Script Programming Language/Data Types and Variables|4]] |  
[[Script Programming Language/Data Types and Variables|4]] |  
[[The Script Programming Language/Primitive Procedures|5]] |  
[[Script Programming Language/Primitive Procedures|5]] |  
[[The Script Programming Language/Control Flow|6]] |  
[[Script Programming Language/Control Flow|6]] |  
[[The Script Programming Language/Procedures|7]] |  
[[Script Programming Language/Procedures|7]] |  
[[The Script Programming Language/Using SC|8]] |  
[[Script Programming Language/Using SC|8]] |  
[[The Script Programming Language/Index|Index]]
[[Script Programming Language/Index|Index]]
</div><br />
</div>
 
<div align="center"><span style="font-size: 22pt">Using SC</span><br />''Author: [[Jeff Stephenson]]''<br />''1988-04-04''</div></div>
<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 />
==<br /> Using SC ==
==<br /> Using SC ==


The sc compiler is invoked with the command
The [[SC|sc compiler]] is invoked with the command


<blockquote>
<blockquote>
Line 35: Line 33:
   
   
====<br /> -l ====
====<br /> -l ====
<blockquote>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</blockquote>
<blockquote>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</blockquote>


====<br /> -n ====
====<br /> -n ====
<blockquote>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.</blockquote>
<blockquote>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.</blockquote>
   
   
====<br /> -oout-dir ====
====<br /> -oout-dir ====
<blockquote>Set the directory for the output file (script.nnn) to out-dir.</blockquote>
<blockquote>Set the directory for the output file (script.nnn) to out-dir.</blockquote>
   
   
====<br /> -v ====
====<br /> -v ====
<blockquote>Turns on verbose mode, which prints the number of bytes occupied by various parts of the output file (code, objects, text, etc.).</blockquote>
<blockquote>Turns on verbose mode, which prints the number of bytes occupied by various parts of the output file (code, objects, text, etc.).</blockquote>
   
   
====<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;
==<br /> References ==
 
<references /><!-- Do not edit this section. It is autopopulated by <ref></ref> tags -->


;Notes
==<br /> Also See ==
<references />


* [[:Category:Compiling|Compiling]]
* [[:Category:SCI Documentation|SCI Documentation]]
* [[:Category:Official SCI Documentation|Official SCI Documentation]]
* [[:Category:Scripting Articles|Scripting Articles]]
* [[Script Resource (SCI)]]
* [[SCI Specifications: Chapter 1 - Introduction#SCRIPT|SCRIPT in the SCI Specifications]]
&nbsp;
&nbsp;


[[The Script Programming Language | Table of Contents]]
[[Official SCI Documentation]]<br />
 
[[Script Programming Language | Table of Contents]]
<span style="float: left">[[The Script Programming Language/Procedures | &lt; Previous: Procedures]]</span>
<span style="float: right">[[The Script Programming Language/Index | Next: Index &gt;]]</span>


<span style="float: left">[[Script Programming Language/Procedures | &lt; Previous: Procedures]]</span>
<span style="float: right">[[Script Programming Language/Index | Next: Index &gt;]]</span>
&nbsp;
&nbsp;
 
[[Category:References]]
[[Category:SCI References]]
[[Category:Historical Pages]]
[[Category:SCI Historical Pages]]
[[Category:Development]]
[[Category:SCI Development]]
[[Category:Documentation]]
[[Category:SCI Documentation]]
[[Category:SCI Documentation]]
[[Category:Official Documentation]]
[[Category:Official SCI Documentation]]
[[Category:Technical Info]]
[[Category:SCI Technical Info]]
[[Category:Scripting]]
[[Category:Scripting]]
[[Category:SCI Scripting]]
[[Category:Script Resources]]
[[Category:SCI Script Resources]]
[[Category:Official SCI Documentation]]
[[Category:Primitive Procedures]]
[[Category:Compiling]]
[[Category:Compiling]]

Latest revision as of 12:39, 2 January 2026

Official SCI Documentation
Table of Contents  

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Index

Using SC
Author: Jeff Stephenson
1988-04-04



Using SC

The sc compiler is invoked with the command

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.


References



Also See

 

Official SCI Documentation
Table of Contents

< Previous: Procedures Next: Index >