Article View: borland.public.delphi.language.objectpascal
Article #27Re: Pointer dereference
From: Skybuck Flying
Date: Wed, 06 Oct 2004 00:46
Date: Wed, 06 Oct 2004 00:46
44 lines
1740 bytes
1740 bytes
"Jason Grace" <jgrace5@hotmail.com> wrote in message
news:642169be.0410040801.5e72b647@posting.google.com...
> Say, you declare:
>
> R = Record
> X, Y: integer;
> S: string;
> end;
>
> P = ^R;
>
Actually it something like
Type
Pr
Tr = record
x,y : integer;
s : string;
end;
var
p : Pr;
p := @r;
p^
>
>
> You then dereference the above S by P^.S, correct?
Yep.
>
> Sometimes I will see just P.S, without the ^. When is this legal?
Since a certain delphi version.
P.S doesn't mean anything for a pointer so it might as well be
interpreted/compiled as P^.S ;)
Less typing required ;) It depends on which style once prefers I guess ;)
Technical Details
Message-ID:
<cjvem6$be2$1@news3.zwoll1.ov.home.nl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.wirehub.nl!newshub3.home.nl!newshub1.home.nl!home.nl!not-for-mailReferences:
<642169be.0410040801.5e72b647@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 109d30,cd66df9d6a4352f3 X-Google-Attributes: gid109d30,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.wirehub.nl!newshub3.home.nl!newshub1.home.nl!home.nl!not-for-mail From: "Skybuck Flying" <nospam@hotmail.com> Newsgroups: borland.public.delphi.language.objectpascal Subject: Re: Pointer dereference Date: Wed, 6 Oct 2004 02:46:18 +0200 Organization: @Home Benelux Lines: 46 Message-ID: <cjvem6$be2$1@news3.zwoll1.ov.home.nl> References: <642169be.0410040801.5e72b647@posting.google.com> NNTP-Posting-Host: cp250405-a.landg1.lb.home.nl X-Trace: news3.zwoll1.ov.home.nl 1097022982 11714 84.25.126.9 (6 Oct 2004 00:36:22 GMT) X-Complaints-To: usenet@corp.home.nl NNTP-Posting-Date: Wed, 6 Oct 2004 00:36:22 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441