Hello all.

I'm self-teaching myself Delphi 5.  I had Pascal experience almost 20 years
ago at Uni and it's all coming back to me slowly.  This is my first Windows
development system.  Previously using Dataflex for DOS (for the last 13
years) which is similar to Pascal.

Anyway, I'm writing a random file based utility which uses Blockread &
Blockwrite.  Can someone tell me why this code doesn't write anything
useful:

Stringvar := 'Hello World'; {defined as string}
Blockwrite(outputfile,Stringvar,1); {outputfile has a record length of 2448}

It just writes 2448 bytes of memory dump which I would expect if Stringvar
was empty.
I tried it with Stringvar defined as an array of char which works fine, but
an array is too much work to fill each char position individually. The
on-line help suggests the buffer parameter can be any variable type so why
doesn't it work?

Thanks,
Ross.
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to