[fpc-pascal]absolute identifier
ron wilson
ron.wilson at coastgames.com
Wed Apr 10 21:54:02 CEST 2002
thanks - ill do that instead. btw the code i posted works afiak.
ron wilson
-----Original Message-----
From: fpc-pascal-admin at deadlock.et.tudelft.nl
[mailto:fpc-pascal-admin at deadlock.et.tudelft.nl]On Behalf Of Jonas Maebe
Sent: Wednesday, April 10, 2002 2:20 PM
To: fpc-pascal at deadlock.et.tudelft.nl
Subject: Re: [fpc-pascal]absolute identifier
On woensdag, april 10, 2002, at 09:09 , ron wilson wrote:
> how about for type casting?
>
> var
> buf: array[1..255] of char;
> buflen: byte;
> str: ansistring;
> ...
> str:=ansistring(buf);
> setlength(str,buflen);
Just use "str := buf;", that should also work (even for shortstrings)
and will take care of setting the length for you (as long as there
aren't any #0 characters in that array).
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