Script Programming Language/Introduction: Difference between revisions
No edit summary |
|||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[ Official SCI Documentation]]<br /> | [[Category:SCI Pages]] | ||
[[ | [[Official SCI Documentation]]<br /> | ||
[[Script Programming Language | Table of Contents]] | |||
| | ||
<div align="center"> | <div align="center"> | ||
Chapter: | Chapter: | ||
[[ | [[Script Programming Language/Introduction|1]] | | ||
[[ | [[Script Programming Language/Files|2]] | | ||
[[ | [[Script Programming Language/Definitions|3]] | | ||
[[ | [[Script Programming Language/Data Types and Variables|4]] | | ||
[[ | [[Script Programming Language/Primitive Procedures|5]] | | ||
[[ | [[Script Programming Language/Control Flow|6]] | | ||
[[ | [[Script Programming Language/Procedures|7]] | | ||
[[ | [[Script Programming Language/Using SC|8]] | | ||
[[ | [[Script Programming Language/Index|Index]] | ||
</div> | </div> | ||
<div align="center"><span style="font-size: 22pt">Script Programming Language/Definitions</span><br />''Author: [[Jeff Stephenson]]''<br />''1988-04-04''</div></div> | |||
<br /> | |||
==<br /> Introduction == | |||
<blockquote> | |||
The Script adventure game language is an object-oriented language with a Lisp-like syntax. It is compiled by the sc compiler into the pseudo-code which is used by the interpreter, sci. | The Script adventure game language is an object-oriented language with a Lisp-like syntax. It is compiled by the sc compiler into the pseudo-code which is used by the interpreter, sci. | ||
| Line 66: | Line 67: | ||
Comments in Script begin with a semi-colon, ';', and continue to the end of the line. | Comments in Script begin with a semi-colon, ';', and continue to the end of the line. | ||
</blockquote> | |||
==<br /> References == | |||
< | |||
<references /><!-- Do not edit this section. It is autopopulated by <ref></ref> tags --> | |||
==<br /> Also See == | |||
* [[:Category:Official SCI Documentation|Official SCI Documentation]] | |||
* [[:Category: Interpreter Articles| Interpreter Articles]] | |||
* [[Script Resource (SCI)]] | |||
* [[SCI Specifications: Chapter 1 - Introduction#SCRIPT|SCRIPT in the SCI Specifications]] | |||
* [[:Category:Script Resources|Script Resource Articles]] | |||
| | ||
[[Official SCI Documentation]]<br /> | |||
[[Script Programming Language | Table of Contents]] | |||
<span style="float: left">[[Script Programming Language |< Previous: Table of Contents]]</span><span style="float: right">[[Script Programming Language/Files|Next: Files >]]</span> | |||
| | ||
[[Category:References]] | |||
[[Category:SCI Documentation]] | [[Category:Historical Pages]] | ||
[[Category:Development]] | |||
[[Category:Documentation]] | |||
[[Category:Official Documentation]] | |||
[[Category:Official SCI Documentation]] | |||
[[Category:Technical Info]] | |||
[[Category:Interpreter Articles]] | |||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:SCI Scripting]] | |||
[[Category:Script Resources]] | |||
Latest revision as of 13:27, 2 January 2026
Official SCI Documentation
Table of Contents
Introduction
The Script adventure game language is an object-oriented language with a Lisp-like syntax. It is compiled by the sc compiler into the pseudo-code which is used by the interpreter, sci.
We will begin our discussion of the language with its basic Lisp-like characteristics, then go on to the object-oriented parts of the language.
As is Lisp, Script is based on parenthesized expressions which return values. An expression is of the form
Code:(procedure [parameter parameter ...]).The parameters to a procedure may themselves be expressions to be evaluated, and may be nested until you lose track of the parentheses.
Unlike Lisp, the procedure itself may NOT be the result of an evaluation. An example of an expression is
Code:(+ (- y 2) (/ x 3))which would be written in infix notation as
Code:(y - 2) + (x / 3)All expressions are guaranteed to be evaluated from left to right. Thus,
Code:(= x 4) (= y (/ (+= x 4) (/= x 2)))will result in y = 2 and x = 4.
Comments in Script begin with a semi-colon, ';', and continue to the end of the line.
References
Also See
- Official SCI Documentation
- Interpreter Articles
- Script Resource (SCI)
- SCRIPT in the SCI Specifications
- Script Resource Articles