1 |
PROVIDE "z-emptyarg.a4c"; |
2 |
(* |
3 |
* This file is part of the ASCEND Modeling Library and is released |
4 |
* under the GNU Public License as described at the end of this file. |
5 |
*) |
6 |
(* this file tests to be sure an array with empty range is handled |
7 |
* properly by the compiler, since emptiness may unexpectedly |
8 |
* occur when reusing models without understanding them in detail. |
9 |
*) |
10 |
|
11 |
MODEL bug( |
12 |
END bug; |
13 |
n IS_A integer_constant; |
14 |
a[1..n] WILL_BE real; |
15 |
); |
16 |
q IS_A real; |
17 |
END bug; |
18 |
MODEL test; |
19 |
a[1..0] IS_A real; |
20 |
b IS_A bug(0,a); |
21 |
END test; |
22 |
|
23 |
|
24 |
(* |
25 |
* z-emptyarg.a4c |
26 |
* by Ben Allan |
27 |
* Part of the ASCEND Library |
28 |
* $Date: 1998/06/17 19:39:35 $ |
29 |
* $Revision: 1.2 $ |
30 |
* $Author: mthomas $ |
31 |
* $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/z-emptyarg.a4c,v $ |
32 |
* |
33 |
* This file is part of the ASCEND Modeling Library. |
34 |
* |
35 |
* Copyright (C) 1997 Benjamin Andrew Allan |
36 |
* |
37 |
* The ASCEND Modeling Library is free software; you can redistribute |
38 |
* it and/or modify it under the terms of the GNU General Public |
39 |
* License as published by the Free Software Foundation; either |
40 |
* version 2 of the License, or (at your option) any later version. |
41 |
* |
42 |
* The ASCEND Modeling Library is distributed in hope that it |
43 |
* will be useful, but WITHOUT ANY WARRANTY; without even the implied |
44 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
45 |
* See the GNU General Public License for more details. |
46 |
* |
47 |
* You should have received a copy of the GNU General Public License |
48 |
* along with the program; if not, write to the Free Software |
49 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check |
50 |
* the file named COPYING. |
51 |
*) |