2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
Iddec printf:proc;
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
String s = "%d\n";
|
|
|
36 |
|
|
|
37 |
String s1 = "From the array ...\n";
|
|
|
38 |
String s2 = "\n\nFrom the general procedure ...\n";
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
Var tag1_nof : nof(3, Int) = make_nof (3(Int), 2(Int), 1(Int));
|
|
|
42 |
|
|
|
43 |
Proc f3 = General Int ( a:Int ... ; )
|
|
|
44 |
|
|
|
45 |
Let p1 = *(Int) ((a *+. offset_pad (parameter_alignment (Int), shape_offset (Int))) *+.
|
|
|
46 |
( offset_pad ( alignment(Int), shape_offset(Int)) .* 0(Int)))
|
|
|
47 |
Let p2 = *(Int) ((a *+. offset_pad (parameter_alignment (Int), shape_offset (Int))) *+.
|
|
|
48 |
( offset_pad ( alignment(Int), shape_offset(Int)) .* 1(Int)))
|
|
|
49 |
Let p3 = *(Int) ((a *+. offset_pad (parameter_alignment (Int), shape_offset (Int))) *+.
|
|
|
50 |
( offset_pad ( alignment(Int), shape_offset(Int)) .* 2(Int)))
|
|
|
51 |
|
|
|
52 |
{
|
|
|
53 |
printf [top] (s2);
|
|
|
54 |
printf [top] (s, p1);
|
|
|
55 |
printf [top] (s, p2);
|
|
|
56 |
printf [top] (s, p3);
|
|
|
57 |
|
|
|
58 |
return (0(Int))
|
|
|
59 |
};
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
Tokdef tag1_n = [n:EXP] EXP (*(Int) (tag1_nof *+. (Sizeof(Int) .* (n - 1(Int)))));
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
Proc main = Int ()
|
|
|
67 |
|
|
|
68 |
Let p1 = tag1_n [1(Int)]
|
|
|
69 |
Let p2 = tag1_n [2(Int)]
|
|
|
70 |
Let p3 = tag1_n [3(Int)]
|
|
|
71 |
{
|
|
|
72 |
printf [top] (s1);
|
|
|
73 |
printf [top] (s, p1);
|
|
|
74 |
printf [top] (s, p2);
|
|
|
75 |
printf [top] (s, p3);
|
|
|
76 |
|
|
|
77 |
f3 [Int] [ 0(Int), (* tag1_nof) ... ; ];
|
|
|
78 |
|
|
|
79 |
return (0(Int))
|
|
|
80 |
};
|
|
|
81 |
|
|
|
82 |
Keep (main, f3)
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|