home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!cs.adelaide.edu.au!andrewd
- From: andrewd@cs.adelaide.edu.au (Andrew Dunstan)
- Newsgroups: comp.lang.ada
- Subject: Re: ADA question
- Message-ID: <8378@sirius.ucs.adelaide.edu.au>
- Date: 31 Aug 92 04:20:54 GMT
- References: <1992Aug27.004228.19551@evb.com> <64955@cup.portal.com>
- Sender: news@ucs.adelaide.edu.au
- Lines: 36
- Nntp-Posting-Host: achilles.cs.adelaide.edu.au
-
- In article <64955@cup.portal.com>, R_Tim_Coslet@cup.portal.com writes:
- |> In article: <8363@sirius.ucs.adelaide.edu.au>
- |> andrewd@cs.adelaide.edu.au (Andrew Dunstan) writes...
- [..]
- |> > DECLARE
- |> > String_Const : CONSTANT String := My_String_Function;
- |> > String_Var : String (String_Const'RANGE) ;
- |> > for string_var use at string_const'address ;
- |> > BEGIN
- |> > Process (String_Var) ; -- parameter's mode: IN OUT
- |> > END ;
- |> >
- [..]
- |>
- |> OUCH! Don't ever do this! It is expressly forbidden in the Ada LRM to use
- |> the "for ... use at" clause for the purpose of overlaying data structures
- |> on top of each other and the results are totally undefined (especially if
- |> you are trying to overlay constants and variables... the constant might
- |> have been placed in ROM by the compiler and linker in certain environments)!
- |>
- |>
- R. Tim Coslet
- Thanks for pointing this out - I did actually look in the LRM before I
- posted, but obviously not hard enough! Finding these little things in the
- LRM is like looking for a needle in a haystack.
-
- Still, mea culpa.
-
- --
- #######################################################################
- # Andrew Dunstan # There's nothing good or bad #
- # Department of Computer Science # but thinking makes it so. #
- # University of Adelaide # #
- # South Australia # - Shakespeare #
- # net: andrewd@cs.adelaide.edu.au # #
- #######################################################################
-