/[ascend]/trunk/models/test/conditionalsyntaxerror.a4c
ViewVC logotype

Contents of /trunk/models/test/conditionalsyntaxerror.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1745 - (show annotations) (download) (as text)
Sun Feb 10 00:20:47 2008 UTC (16 years, 4 months ago) by jpye
File MIME type: text/x-ascend
File size: 714 byte(s)
Added test case for bug #278.
1 REQUIRE "atoms.a4l";
2
3 MODEL conditionalsyntaxerror;
4 x IS_A factor;
5 y IS_A factor;
6
7 isvert: y <= 1;
8 isparab: x > 1;
9
10 vert: x = 0;
11 diag: y = x + 1;
12 parab:y - 2 = (x - 1)^2;
13
14 isvertp IS_A boolean_var;
15 isvertp = SATISFIED(isvert);
16
17 isparabp IS_A boolean_var;
18 isparabp = SATISFIED(isparab);
19
20 WHEN (isvertp, isparabp)
21 CASE TRUE,FALSE:
22 USE vert;
23 CASE FALSE,TRUE:
24 USE parab;
25 OTHERWISE :
26 USE diag;
27 END WHEN;
28
29 METHODS
30 METHOD default_self;
31 isvert := FALSE;
32 isparam := FALSE;
33 y := 0.5;
34 x := 0.5;
35 END default_self;
36
37 METHOD values;
38 x := 3;
39 END values;
40
41 METHOD specify;
42 FIX x;
43 END specify;
44
45 METHOD on_load;
46 RUN default_self; RUN values; RUN specify;
47 END on_load;
48
49 END conditionalsyntaxerror;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22