Next
Previous Contents
A Guide to the S-Lang Language
John E. Davis,
davis@space.mit.edu
Jun 18, 2005
1.
Preface
1.1
A Brief History of
S-Lang
1.2
Acknowledgements
2.
Introduction
2.1
Language Features
2.2
Data Types and Operators
2.3
Statements and Functions
2.4
Error Handling
2.5
Run-Time Library
2.6
Input/Output
2.7
Obtaining more information about
S-Lang
3.
Overview of the Language
3.1
Variables and Functions
3.2
Strings
3.3
Referencing and Dereferencing
3.4
Arrays
3.5
Lists
3.6
Structures and User-Defined Types
3.7
Namespaces
4.
Data Types and Literal Constants
4.1
Predefined Data Types
4.2
Typecasting: Converting from one Type to Another
5.
Identifiers
6.
Variables
7.
Operators
7.1
Unary Operators
7.2
Binary Operators
7.3
Mixing Integer and Floating Point Arithmetic
7.4
Short Circuit Boolean Evaluation
8.
Statements
8.1
Variable Declaration Statements
8.2
Assignment Statements
8.3
Conditional and Looping Statements
8.4
break, return, and continue
9.
Functions
9.1
Calling Functions
9.2
Declaring Functions
9.3
Parameter Passing Mechanism
9.4
Referencing Variables
9.5
Functions with a Variable Number of Arguments
9.6
Returning Values
9.7
Multiple Assignment Statement
9.8
Exit-Blocks
10.
Namespaces
11.
Arrays
11.1
Creating Arrays
11.2
Reshaping Arrays
11.3
Simple Array Indexing
11.4
Indexing Multiple Elements with Ranges
11.5
Arrays and Variables
11.6
Using Arrays in Computations
12.
Associative Arrays
13.
Structures and User-Defined Types
13.1
Defining a Structure
13.2
Accessing the Fields of a Structure
13.3
Linked Lists
13.4
Defining New Types
13.5
Operator Overloading
14.
Lists
15.
Error Handling
15.1
Traditional Error Handling
15.2
Error Handling through Exceptions
16.
Loading Files: evalfile, autoload, and require
17.
Modules
17.1
Introduction
17.2
Using Modules
18.
File Input/Output
18.1
Input/Output via stdio
18.2
POSIX I/O
18.3
Advanced I/O techniques
19.
Debugging
19.1
Tracebacks
19.2
Using the sldb debugger
20.
Regular Expressions
20.1
S-Lang
RE Syntax
20.2
Differences between
S-Lang
and egrep REs
Appendix
21.
S-Lang 2 Interpreter NEWS
21.1
What's new for
S-Lang
2
21.2
Upgrading to
S-Lang
2
22.
Copyright
22.1
The GNU Public License
Next
Previous Contents