* Sam Harbaugh's generic strings package
@ 1987-11-28 18:23 Mike Feldman
0 siblings, 0 replies; only message in thread
From: Mike Feldman @ 1987-11-28 18:23 UTC (permalink / raw)
Referring to Sam Harbaugh's program on which DEC and Alsys gave
conflicting compilation verdicts, I can add to the confusion. I
tried six compilers, which gave the following results:
TeleSoft vers. 1.1 (VM/CMS) OK, no errors
TeleSoft vers. 3.13(VAX/VMS) OK, no errors
Verdix vers. 5.41 (VAX/VMS) OK, no errors
Verdix vers. 5.41 (Sun/Unix) OK, no errors
Meridian vers. 2.0 (MS-DOS) terminal traffic and listing follow
AdaEd/C vers. 1.7.2(MS-DOS) listing follows Meridian
Can someone authoritative please interpret all these results?
--------------------------------------------------------------------
Meridian AdaVantage(tm) Compiler [v2.0 Jul 26, 1987] Target 8086
Package generic_strings added to library.
Package body generic_strings added to library.
Package body strings added to library.
"weird.ada", line 27: <<error>> illegal reference to generic "generic_strings"
"weird.ada", line 31: <<error>> missing library unit "string_operators"
"weird.ada", line 34: <<error>> type clash in parameter to "="
40 lines compiled.
3 errors detected.
\f
--------------------------------------------------------------------
Meridian AdaVantage v2.0 Source file: weird.ada Page 1
Sat Nov 28 1987 12:50:25
1 generic
2 SIZE : POSITIVE;
3 package GENERIC_STRINGS is
4 type VARYING_STRING_TYPE is private;
5 -- This is the inner generic package that is used to make the
6 -- VARYING_STRING operators visible.
7 generic
8 package OPERATORS is
9 function "=" (LEFT : VARYING_STRING_TYPE;
10 RIGHT : VARYING_STRING_TYPE) return BOOLEAN
11 renames GENERIC_STRINGS."=";
12 end OPERATORS;
13 private
14 type VARYING_STRING_TYPE is
15 record
16 LENGTH : NATURAL := 0;
17 end record;
18 end GENERIC_STRINGS;
19 ---------------------------------------
20 package body GENERIC_STRINGS is
21 end GENERIC_STRINGS;
22 ----------------------------------
23 with GENERIC_STRINGS;
24 package STRINGS is new GENERIC_STRINGS (132);
25 ----------------------------------
26 with STRINGS;
27 package STRING_OPERATORS is new STRINGS.OPERATORS;
**
*****E illegal reference to generic "generic_strings"
**
28 ----------------------------------
29 with STRINGS;
30 with STRING_OPERATORS; use STRING_OPERATORS;
31 procedure L is
**
*****E missing library unit "string_operators"
**
32 PDL : STRINGS.VARYING_STRING_TYPE;
33 begin
34 if PDL = PDL then null; end if;
**
*****E type clash in parameter to "="
**
35 end L;
END MERIDIAN; BEGIN ADA/ED-C
----------------------------------------------------------------
\fNYU Ada/ED-C 1.7.2 (MS/DOS 3.0) Sat 28 Nov 1987 13:13:26 PAGE 1
1: generic
2: SIZE : POSITIVE;
3: package GENERIC_STRINGS is
4: type VARYING_STRING_TYPE is private;
5: -- This is the inner generic package that is used to make the
6: -- VARYING_STRING operators visible.
7: generic
8: package OPERATORS is
9: function "=" (LEFT : VARYING_STRING_TYPE;
10: RIGHT : VARYING_STRING_TYPE) return BOOLEAN
11: renames GENERIC_STRINGS."=";
^
*** ERROR: = not declared in GENERIC_STRINGS (RM 4.1.3, 8.3)
^
*** ERROR: invalid renaming (RM 8.5)
12: end OPERATORS;
13: private
14: type VARYING_STRING_TYPE is
15: record
16: LENGTH : NATURAL := 0;
17: end record;
18: end GENERIC_STRINGS;
19: ---------------------------------------
20: package body GENERIC_STRINGS is
21: end GENERIC_STRINGS;
22: ----------------------------------
23: with GENERIC_STRINGS;
24: package STRINGS is new GENERIC_STRINGS (132);
25: ----------------------------------
26: with STRINGS;
27: package STRING_OPERATORS is new STRINGS.OPERATORS;
28: ----------------------------------
29: with STRINGS;
30: with STRING_OPERATORS; use STRING_OPERATORS;
31: procedure L is
32: PDL : STRINGS.VARYING_STRING_TYPE;
33: begin
34: if PDL = PDL then null; end if;
35: end L;
36:
2 errors detected
Michael B. Feldman residence address for SNail:
Professor, Dept. of EE&CS Michael B. Feldman
The George Washington University 6218 Wagner Lane
Washington, DC 20052 U.S.A. Bethesda, MD 20816 U.S.A.
202-994-7593
MFELDMAN@GWUVM.BITNET
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1987-11-28 18:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-11-28 18:23 Sam Harbaugh's generic strings package Mike Feldman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox