[fpc-pascal]Strings vs. Ansistrings
Carlo Kok
ckok.1 at hccnet.nl
Tue Sep 19 23:02:53 CEST 2000
There are different ways of storing an ansistring, like first save the size,
them the data (See previous mail) or save it as a Pchar. May I ask what kind
of program needs to read an array of strings from a file? If you want to
read a text-file you should use TStringList (FCL?) or something else, but
you can not load it directly.
Greetings
Carlo Kok (born: 16-08-1984)
ICQ: 73059433
Volendam; The Netherlands
----- Original Message -----
From: <James_Wilson at i2.com>
To: <fpc-pascal at deadlock.et.tudelft.nl>
Sent: Tuesday, September 19, 2000 5:09 PM
Subject: Re: [fpc-pascal]Strings vs. Ansistrings
>
> > Also the link of a ShortString is 255 (that's the same as string in $H-
> > mode). De sizeof an ansistring is unlimited (Sizeof(Memory) -
Sizeof(Os))
>
> I don't suspect that it's a size issue; I'm loading a file that's 1.3 meg,
> but I have 320 meg of RAM in this computer. Also, you're previous reply
> eluded to a problem writing a file using ^string if they're ansistrings,
> but that's not the problem either in this case (but how does one write
> ^ansistrings to a file anyway?). Where I seem to be running into
> difficulties is when trying to writeln to the screen. Then, I get nothing
> but garbage. If I compile with {$H-} everything works fine, but {$H+}
> causes garbage to be written to the screen for both go32 and win32
targets.
> Weird...
>
> Another thing I found; clreol doesn't seem to work too well with win32
> (console mode) targets. Again, I can compile the identical source code and
> clreol works fine on go32 executables, but often leaves behind characters
> when with win32 executables. FWIW, I use the window () function to set
> window sizes, and it's within these windows that clreol seems to have the
> most problems.
>
> Regards,
> Jim Wilson
>
>
> _______________________________________________
> 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