* LRM:3.10.1(5), Can't reference incomplete type compile error
@ 2002-10-19 15:14 Dominic D'Apice
2002-10-19 15:49 ` Robert A Duff
2002-10-21 15:10 ` Wes Groleau
0 siblings, 2 replies; 3+ messages in thread
From: Dominic D'Apice @ 2002-10-19 15:14 UTC (permalink / raw)
Hi all, i got this compile error :
Error: line 24 col 48 LRM:3.10.1(5), Can't reference incomplete type
See the "error =>" flag, Can someone help me with that ? thanks
Dominic
------------------------------------------------------------------------
ADS
---
PRIVATE
type reservation;
type louer is access reservation;
procedure allouer_res (ptr_reservation : in out louer ;
objet_reservation : in "error =>"reservation);
ADB
---
type reservation is record
num : natural := 0;
plancher : integer := 20;
plafond : integer := 20;
classe : auto_res := econo;
nomclient : string(1..256);
end record;
procedure allouer_res (ptr_reservation : in out louer ;
objet_reservation : in reservation ) is
begin
null;
end allouer_res;
------------------------------------------------------------------------
---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LRM:3.10.1(5), Can't reference incomplete type compile error
2002-10-19 15:14 LRM:3.10.1(5), Can't reference incomplete type compile error Dominic D'Apice
@ 2002-10-19 15:49 ` Robert A Duff
2002-10-21 15:10 ` Wes Groleau
1 sibling, 0 replies; 3+ messages in thread
From: Robert A Duff @ 2002-10-19 15:49 UTC (permalink / raw)
"Dominic D'Apice" <dapiced@sympatico.ca> writes:
> Hi all, i got this compile error :
>
> Error: line 24 col 48 LRM:3.10.1(5), Can't reference incomplete type
>
> See the "error =>" flag, Can someone help me with that ? thanks
>
> Dominic
>
> ------------------------------------------------------------------------
>
> ADS
> ---
>
> PRIVATE
> type reservation;
> type louer is access reservation;
>
> procedure allouer_res (ptr_reservation : in out louer ;
> objet_reservation : in "error =>"reservation);
You can't refer to an incomplete type except via a pointer.
You might want:
Objet_Reservation : access Reservation);
Alternatively, you can move the record type into the private part,
before the declaration of allouer_res.
The exact rule is given in the RM paragraph mentioned in the error
message.
- Bob
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LRM:3.10.1(5), Can't reference incomplete type compile error
2002-10-19 15:14 LRM:3.10.1(5), Can't reference incomplete type compile error Dominic D'Apice
2002-10-19 15:49 ` Robert A Duff
@ 2002-10-21 15:10 ` Wes Groleau
1 sibling, 0 replies; 3+ messages in thread
From: Wes Groleau @ 2002-10-21 15:10 UTC (permalink / raw)
> Error: line 24 col 48 LRM:3.10.1(5), Can't reference incomplete type
> PRIVATE
> type reservation;
> type louer is access reservation;
>
> procedure allouer_res (ptr_reservation : in out louer ;
> objet_reservation : in reservation); -- ERROR
Since the structure of "reservation" is not defined, the compiler
has no way of generating the calling code to prepare to pass one
of them in to the procedure. If the compiler were to use ESP or
looking elsewhere to find out the structure, it would be violating
other rules in addition to the rule cited.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-21 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-19 15:14 LRM:3.10.1(5), Can't reference incomplete type compile error Dominic D'Apice
2002-10-19 15:49 ` Robert A Duff
2002-10-21 15:10 ` Wes Groleau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox