[fpc-pascal]Pointer Help

James Mills prologic at prologitech.com
Sun Feb 9 11:30:57 CET 2003


Hi all,

Sorry if this is trivial, but I'm sick of it :)
I'm using fpc to convert my (originally delphi) code to read and write
ini style files, however writing will not work as I want, the data in
the pointer keeps getting filled with junk.

I'm using getMem, and reAllocMem functions to create dynamic arrays of
strings. The writeINI function reads the entire file in, but doesn't
even do that correctly.

I have a test program that uses the same idea, and it works perfectly,
so I'm very bewildered :(

attached is the code if someone would like to have a look at it, please.

thank you
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inifiles.pas
Type: text/x-pascal
Size: 4167 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20030209/384dcf73/attachment.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readtest.pas
Type: text/x-pascal
Size: 295 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20030209/384dcf73/attachment-0001.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writetest.pas
Type: text/x-pascal
Size: 347 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20030209/384dcf73/attachment-0002.pas>


More information about the fpc-pascal mailing list