Hi,
"packed record" is for compatibility. Its guaranteed that inner alignment and size of
record will be always the same and will not change in future versions of compiler, unlike the plain
"record".
https://www.freepascal.org/docs-html/ref/refsu15.html
V.
On 2017-07-08 07:57, Felipe Monteiro de Carvalho wrote:
Since we are talking about language features, after learning Java I
think we could use in Pascal:
I must say, after using Java more and more in recent months, it starts
to show why so many developers call Delphi/Object Pascal out of
I prefer performance over size, The only reason 'GC' was a byte was because it
didn't really need to be a word, however it wouldn't hut to be a word anyway,
so I could just use this:
Type
DrawCMD = Record
GC: Word;
On 2017-07-06 17:52, Marco van de Voort wrote:
''' already has meaning, you'll see that
The 3 quotes were simply an idea. You correctly identified that it is
already used is some special cases, so then simply replace it with some
other unique syntax that is not used yet. As Z505 mentioned,
Thanks for the link. For best compatibility should I make it:
Type
DrawCMD = Packed Record
GC: Word;
PX,PY,PZ,GX,GY,GZ,GI,GJ,R,SA,EA:Double;
End;
Or
Type
{$PackRecords 2}
DrawCMD = Record
On Sun, 9 Jul 2017, Graeme Geldenhuys wrote:
On 2017-07-08 07:57, Felipe Monteiro de Carvalho wrote:
Since we are talking about language features, after learning Java I
think we could use in Pascal:
I must say, after using Java more and more in recent months, it starts
to show why so many
Hi,
I've give a short reply here, in case others deem this off-topic. I
always seem to end up in hot water about such stuff here. I can send you
more details in private if need be.
On 2017-07-09 22:16, Michael Van Canneyt wrote:
Would it be possible to give examples ?
Maybe there are things
Hello,
I'll try something like
If filesize(drawfile)>0 then
Seek(drawfile, sizeof(drawfile)-1)
else
"empty file";
For portability of you file and software, I recommand you to use a "packed record" with an internal
forced word-align of the double data. If size matters, no need to align.
I have a few questions about fixed record files. I have the following:
Type
DrawCMD = Record
GC: Byte;
PX,PY,PZ,GX,GY,GZ,GI,GJ,R,SA,EA:Double;
End;
Var
DrawFile: File Of DrawCMD;
Drawinfo:
Forwarded at request of fra...@rhost.it:
On Fri, 7 Jul 2017, nore...@z505.com wrote:
For integers beyond 64 bit, or even beyond 32 bit on a 64 bit machine, why
can't the math be broken down into peices the way a human does it on paper,
and then theoretically any number can be added
10 matches
Mail list logo