1 |
|
2 |
--| Copyright (c) 1993-2006 University of Southern California and contributors. |
3 |
--| All rights reserved. |
4 |
--| Your use of this work is governed under the terms of the GNU General |
5 |
--| Public License version 2. |
6 |
|
7 |
class TEST |
8 |
creation |
9 |
make |
10 |
feature |
11 |
|
12 |
make is |
13 |
local |
14 |
a: TEST1 [DOUBLE]; |
15 |
b: TEST1 [INTEGER]; |
16 |
c: TEST1 [REAL]; |
17 |
d: TEST1 [BOOLEAN]; |
18 |
e: TEST1 [CHARACTER]; |
19 |
f: TEST1 [POINTER]; |
20 |
g: TEST1 [STRING]; |
21 |
p: POINTER; |
22 |
do |
23 |
!!a; |
24 |
print (a # 13.47); io.new_line; |
25 |
print (a # 13); io.new_line; |
26 |
print (a # Double_const); io.new_line; |
27 |
print (a # Real_const); io.new_line; |
28 |
print (a # Integer_const); io.new_line; |
29 |
!!b; |
30 |
print (b # 13); io.new_line; |
31 |
print (b # Integer_const); io.new_line; |
32 |
!!c; |
33 |
print (c # 13.47); io.new_line; |
34 |
print (c # 13); io.new_line; |
35 |
print (c # Real_const); io.new_line; |
36 |
print (c # Integer_const); io.new_line; |
37 |
!!d; |
38 |
print (d # True); io.new_line; |
39 |
!!e; |
40 |
print (e # 'Z'); io.new_line; |
41 |
!!f; |
42 |
print (f # p); io.new_line; |
43 |
!!g; |
44 |
io.putstring (g # "weasel"); io.new_line; |
45 |
$INSTRUCTION; |
46 |
end |
47 |
|
48 |
Double_const: DOUBLE is 29.47; |
49 |
Real_const: REAL is 29.47; |
50 |
Integer_const: INTEGER is 13; |
51 |
|
52 |
end |