Script Programming Language/Introduction: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
No edit summary
Andrew Branscom (talk | contribs)
No edit summary
Line 14: Line 14:
[[The Script Programming Language/Index|Index]]
[[The Script Programming Language/Index|Index]]
</div>
</div>
<div align="center"><span style="font-size: 22pt">SCI Kernel Documentation/Arithmetic Functions</span><br />''Author: [[Jeff Stephenson]]''<br />''1988-04-04''</div></div>


<div align="center"><span style="font-size: 22pt">Introduction</span><br />
<br />
''Author: [[Jeff Stephenson]]''</div>
==<br /> Introduction ==
 
&nbsp;


<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 66:


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 ==


&nbsp;
<references /><!-- Do not edit this section. It is autopopulated by <ref></ref> tags -->


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


* [[:Category: Documentation| Documentation]]
* [[:Category: Official Documentation| Official 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]]
&nbsp;
&nbsp;


[[ Official SCI Documentation]]<br />
[[The Script Programming Language | Table of Contents]]
[[The Script Programming Language | Table of Contents]]
&nbsp;


<span style="float: left">[[The Script Programming Language |&lt; Previous: Table of Contents]]</span><span style="float: right">[[The Script Programming Language/Files|Next: Files &gt;]]</span>
<span style="float: left">[[The Script Programming Language |&lt; Previous: Table of Contents]]</span><span style="float: right">[[The Script Programming Language/Files|Next: Files &gt;]]</span>
&nbsp;
&nbsp;
 
[[Category:References]]
[[Category:SCI Documentation]]
[[Category:Historical Pages]]
[[Category:Scripting]]
[[Category:Development]]
[[Category:Documentation]]
[[Category:Official Documentation]]
[[Category:Technical Info]]
[[Category:Interpreter Articles]]
[[Category:Scripting Articles]]
[[Category:Script Resources]]

Revision as of 20:46, 25 December 2025

Official SCI Documentation
Table of Contents  

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

SCI Kernel Documentation/Arithmetic Functions
Author: Jeff Stephenson
1988-04-04



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
Table of Contents

< Previous: Table of ContentsNext: Files >