[fpc-pascal]What exactly is Pchar good for ?

A.J. Venter ddt at vukanet.co.za
Thu Jul 18 19:28:55 CEST 2002


Ok,
I am getting more annoyed by the day with these PChars. Half the packages use them, and I they don't seem to have any REAL virtue at all.
They still have the 256 character limit (as I found out today when a program suddenly broke) they cannot be easilly typecast to strings and back and who know how many 
other idiotics in there.

Why larry why ?

I use ansistrings for almost everything, but here I am creating a mysql backed CGI when suddenly stuff starts mysteriously breaking, and I discover (after nearly and hour of
hunting through over 2000 lines of code) that even though my ansistring CGI input works fine, any remotely big textarea becomes to big to fit into a pchar, which is what
I need to typecast  (and whoever heard of needing 4 different statements to typecase one string type to another ?) my inputs to in order to do a mysql_query. 

Ok, so besides the rant, can somebody please explain to me just what it is that makes pchars popular, or even allows their continued existence ?
Is there something I missed ? 
Or is just a case of C having pathetic string handling and pchar being a pathetic string handler for pascal because it is designed ot be C compatible ?

/me bangs head against table repeatedly.

Ciao
A.J.

On Wednesday 17 July 2002 20:17, Jonas Maebe wrote:
> On Wed, 17 Jul 2002, Jilani Khaldi wrote:
> > does FPC have the Delphi StrToFloat function?
>
> Yes, it's part of the sysutils unit.
>
>
> Jonas
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list