Re: Safe pointer arithmetic and typecasts :D
From: Skybuck Flying (nospam_at_hotmail.com)
Date: 03/31/04
- Next message: Skybuck Flying: "Re: Handling Out Of Memory"
- Previous message: Bruce Roberts: "Re: Handling Out Of Memory"
- In reply to: Bruce Roberts: "Re: Safe pointer arithmetic and typecasts :D"
- Next in thread: J French: "Re: Safe pointer arithmetic and typecasts :D"
- Reply: J French: "Re: Safe pointer arithmetic and typecasts :D"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 17:30:41 +0200
"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:L2Bac.54630$1A6.1209395@news20.bellglobal.com...
>
> "Skybuck Flying" <nospam@hotmail.com> wrote in message
> news:c4ds2v$4ag$1@news5.tilbu1.nb.home.nl...
>
> > I always wondered how to do safe pointer aritmetic in delphi without
> > overflow errors or warnings...
>
> There is no really safe method of doing pointer arithmatic in any
language.
> But there really isn't a need to use pointers in Delphi unless one is
> constructing trees and graphs. In which case pointer arithmatic is not
> needed. If you want to index through a linear structure use the tools
> available in Delphi. Namely arrays. In the case of text, use the long
string
> type. It can be indexed as a vector (array) so there is no need for pChar.
> The advantage of using array references is that when bounds checking is
> turned on the program is going to catch any invalid indexes.
Lol, you too funny :)
Trust me, for my requirements it's absolutely 100% needed :D
Using arrays and indices instead would make it even more difficult. ;) :D
- Next message: Skybuck Flying: "Re: Handling Out Of Memory"
- Previous message: Bruce Roberts: "Re: Handling Out Of Memory"
- In reply to: Bruce Roberts: "Re: Safe pointer arithmetic and typecasts :D"
- Next in thread: J French: "Re: Safe pointer arithmetic and typecasts :D"
- Reply: J French: "Re: Safe pointer arithmetic and typecasts :D"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|