Difference between revisions of "Script Classes for Adventure Games/Code Class"
From SCI Wiki
Jump to navigationJump to search| Line 39: | Line 39: | ||
| | ||
| − | + | ==<br /> The Code Class == | |
| + | |||
| + | The class Code encapsulates the concept of a subroutine into an object which can be executed or passed to an object for execution. This class is also used for making loopers and viewers. | ||
| + | |||
| + | {| | ||
| + | |width= "125"|In file:||system.sc | ||
| + | |- | ||
| + | |Inherits from:||Object | ||
| + | |- | ||
| + | |Inherited by:||none | ||
| + | |} | ||
| + | |||
| + | ===<br /> Properties === | ||
| + | <blockquote></blockquote> | ||
| + | |||
| + | ===<br /> Methods === | ||
| + | |||
| + | <blockquote> | ||
| + | ==== doit: [args...] ==== | ||
| + | <blockquote>The doit: method of a Code object is the code to be executed. Any number of arguments is allowed.</blockquote> | ||
| + | </blockquote> | ||
| | ||
Latest revision as of 02:10, 11 December 2015
Chapter:
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
Index
The Code Class
The class Code encapsulates the concept of a subroutine into an object which can be executed or passed to an object for execution. This class is also used for making loopers and viewers.
| In file: | system.sc |
| Inherits from: | Object |
| Inherited by: | none |
Properties
Methods
doit: [args...]
The doit: method of a Code object is the code to be executed. Any number of arguments is allowed.
- Notes
< Previous: The File Class Next: Global Variables >