/[eiffelstudio]/trunk/eweasel/tests/exec168/test1.e
ViewVC logotype

Contents of /trunk/eweasel/tests/exec168/test1.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years, 1 month ago) by manus
File size: 1149 byte(s)
Moved from trunk/Src/eweasel to trunk/eweasel so that a simple checkout of the source code is not penalized by the lenghty process of checking out all the tests of eweasel.
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 TEST1
8 feature
9
10 weasel (k: DOUBLE): DOUBLE is
11 external
12 "C inline"
13 alias
14 "floor($k)"
15 end
16
17 stoat (k: DOUBLE): DOUBLE is
18 external
19 "C use <math.h>"
20 alias
21 "floor"
22 end
23
24 ermine (k: DOUBLE): DOUBLE is
25 external
26 "C signature (double): double use <math.h>"
27 alias
28 "floor"
29 end
30
31 infix "@@@1" (k: DOUBLE): DOUBLE is
32 external
33 "C inline"
34 alias
35 "floor($k)"
36 end
37
38 infix "@@@2" (k: DOUBLE): DOUBLE is
39 external
40 "C use <math.h>"
41 alias
42 "floor"
43 end
44
45 infix "@@@3" (k: DOUBLE): DOUBLE is
46 external
47 "C signature (double): double use <math.h>"
48 alias
49 "floor"
50 end
51
52 try is
53 do
54 io.put_double (weasel (47.9)); io.new_line;
55 io.put_double (ermine (48.9)); io.new_line;
56 io.put_double (stoat (49.9)); io.new_line;
57 io.put_double (Current @@@1 29.9); io.new_line;
58 io.put_double (Current @@@2 30.9); io.new_line;
59 io.put_double (Current @@@3 31.9); io.new_line;
60 end
61 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23