OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.chill/] [tuples.ch] - Blame information for rev 107

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
x: MODULE
2
 
3
SYNMODE m_arri = ARRAY(1:5) INT;
4
DCL v_arri m_arri := [ -1, -2, -3, -4, -5 ];
5
 
6
SYNMODE m_arrui = ARRAY(1:5) UINT;
7
DCL v_arrui m_arrui := [ 1, 2, 3, 4, 5 ];
8
 
9
SYNMODE r1 = RANGE (1:5);
10
SYNMODE m_arrb = ARRAY(r1) BYTE;
11
DCL v_arrb m_arrb := [ -3, -4, -5, -6, -7 ];
12
 
13
SYNMODE m_arrub = ARRAY(r1) UBYTE;
14
DCL v_arrub m_arrub := [ 3, 4, 5, 6, 7 ];
15
 
16
SYNMODE m_arrc = ARRAY (1:5) CHAR;
17
DCL v_arrc m_arrc := [ '1', '2', '3', '4', '5' ];
18
 
19
SYNMODE m_ps = POWERSET r1;
20
DCL v_ps m_ps := [ 1, 3, 5 ];
21
 
22
DCL v_cv CHARS(20) VARYING := "foo";
23
 
24
SYNMODE m_arrbool = ARRAY(r1) BOOL;
25
DCL v_arrbool m_arrbool := [ true, false, true, false, true ];
26
 
27
DCL j r1 := 4;
28
 
29
DCL i INT;
30
 
31
newmode vstruct = struct (a, b long,
32
                          case b of
33
                           (42): ch8 chars(20),
34
                           (52): i long
35
                           else  ch1 char
36
                         esac);
37
 
38
DCL vstr vstruct := [ .a: 10, .b: 52, .i: 100 ];
39
 
40
i := 0;
41
 
42
END x;
43
 
44
setmode: MODULE /* This is from Cygnus PR chill/5024. */
45
 
46
NEWMODE day = SET( monday, tuesday, wednesday, thursday, friday, saturday, sunday );
47
NEWMODE dow = POWERSET day;
48
 
49
DCL d day;
50
DCL w dow;
51
 
52
printdow: PROC( w dow );
53
  DCL d day;
54
  DO FOR d in w;
55
    WRITETEXT( stdout, "%C ", d );
56
  OD;
57
END;
58
 
59
d := monday;
60
w := dow[monday : friday];
61
printdow( w );
62
 
63
printdow( dow[LOWER(dow) : UPPER(dow)] );
64
 
65
END setmode;
66
 
67
PR8643: MODULE
68
 
69
SYNMODE m_set = SET (a, b, c, d);
70
SYNMODE m_ps = POWERSET m_set;
71
 
72
SYNMODE m_s1 = STRUCT (str CHARS(40) VARYING, i INT, ps m_ps);
73
DCL vs1 m_s1;
74
 
75
SYNMODE m_s2 = STRUCT (i LONG, s m_s1);
76
DCL vs2 m_s2;
77
 
78
SYNMODE m_arr = ARRAY (1:3) BYTE;
79
SYNMODE m_s3 = STRUCT (i LONG, a m_arr);
80
DCL vs3 m_s3;
81
 
82
DCL i LONG;
83
 
84
i := 24;
85
 
86
END PR8643;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.