Duncan Parsons wrote:
Must confess, Joost's seemed the most readable, simple and portable :-)
but consider NtoLE, if you are dealing mostly with Little Endian
machines. Should be faster then.
Regards, Bernd.
___
Lazarus mailing list
I have a file into which I want to put a long integer:
00 00 19 7A
The file expects the value in the form:
buffer[0]:=122;
buffer[1]:=25;
buffer[2]:=0;
buffer[3]:=0;
I am then intending to write this buffer to the file
FS.Writebuffer(buffer,4);
Is there a way of loading the buffer directly
Dave Coventry wrote:
I have a file into which I want to put a long integer:
00 00 19 7A
The file expects the value in the form:
buffer[0]:=122;
buffer[1]:=25;
buffer[2]:=0;
buffer[3]:=0;
I am then intending to write this buffer to the file
FS.Writebuffer(buffer,4);
Is there a
System.Move()
On Thu, Jan 8, 2009 at 8:05 AM, Dave Coventry dgcoven...@gmail.com wrote:
I have a file into which I want to put a long integer:
00 00 19 7A
The file expects the value in the form:
buffer[0]:=122;
buffer[1]:=25;
buffer[2]:=0;
buffer[3]:=0;
I am then intending to write
Bernd Mueller wrote:
Dave Coventry wrote:
I have a file into which I want to put a long integer:
00 00 19 7A
The file expects the value in the form:
buffer[0]:=122;
buffer[1]:=25;
buffer[2]:=0;
buffer[3]:=0;
I am then intending to write this buffer to the file
Dave Coventry schrieb:
I have a file into which I want to put a long integer:
00 00 19 7A
The file expects the value in the form:
Which file?
buffer[0]:=122;
buffer[1]:=25;
buffer[2]:=0;
buffer[3]:=0;
That's the Intel byte order.
I am then intending to write this buffer to the file
Thanks DoDi.
2009/1/8 Hans-Peter Diettrich drdiettri...@aol.com:
Dave Coventry schrieb:
Which file?
It's just a data file that I'm writing to. But it does have to be
portable to other applications.
That's the Intel byte order.
Yes, the specification of the datafile require little endian byte
Dave Coventry schrieb:
What is loading? Reading from the file?
No, the integer value is calculated and must be saved to the file.
There is more than one integer in a 48 byte block and I want to write
this block to the file, so I'm loading a 48 byte buffer. Some of the
values are single bytes