author | Claus Gittinger <cg@exept.de> |
Sat, 10 Feb 1996 19:33:23 +0100 | |
changeset 212 | ff39051e219f |
parent 148 | ef0e604209ec |
child 261 | 0372e948ca2d |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
103
diff
changeset
|
3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Object subclass:#Variable |
|
140 | 14 |
instanceVariableNames:'value name used' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Compiler-Support' |
|
0 | 18 |
! |
19 |
||
20 | 20 |
!Variable class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
103
diff
changeset
|
25 |
All Rights Reserved |
20 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
node for parse-trees, representing variables |
|
39 |
" |
|
40 |
! ! |
|
0 | 41 |
|
42 |
!Variable class methodsFor:'instance creation'! |
|
43 |
||
44 |
name:name |
|
11 | 45 |
"return a new node for a variable named name" |
0 | 46 |
^ (self new) name:name |
47 |
! ! |
|
48 |
||
49 |
!Variable methodsFor:'accessing'! |
|
50 |
||
140 | 51 |
name |
52 |
"return the name of the variable" |
|
11 | 53 |
|
140 | 54 |
^ name |
0 | 55 |
! |
56 |
||
57 |
name:aString |
|
11 | 58 |
"set the name of the variable" |
59 |
||
0 | 60 |
name := aString |
61 |
! |
|
62 |
||
140 | 63 |
used |
64 |
"return the flag marking that this variable has been used" |
|
11 | 65 |
|
140 | 66 |
^ used |
67 |
! |
|
68 |
||
69 |
used:aBoolean |
|
70 |
"set/clear the flag marking that this variable has been used" |
|
71 |
||
72 |
used := aBoolean |
|
0 | 73 |
! |
74 |
||
75 |
value |
|
11 | 76 |
"return the value of the variable" |
77 |
||
0 | 78 |
^ value |
79 |
! |
|
80 |
||
140 | 81 |
value:v |
82 |
"set the value of the (simulated) variable" |
|
83 |
||
84 |
value := v |
|
85 |
! |
|
86 |
||
31 | 87 |
variableValue |
88 |
"return the value of the variable" |
|
89 |
||
90 |
^ value |
|
140 | 91 |
! ! |
11 | 92 |
|
148 | 93 |
!Variable class methodsFor:'documentation'! |
94 |
||
95 |
version |
|
96 |
^ '$Header: /cvs/stx/stx/libcomp/Variable.st,v 1.11 1995-12-03 12:14:22 cg Exp $' |
|
97 |
! ! |