Re[2]: [fpc-pascal] variant part of a record

2006-09-20 Thread Пётр Косаревский
Vinzent H?fler Probably you should used a packed record, though. And it's in no Vinzent H?fler way portable, of course. Also correct. Jonas I use {$A-} abc= record something: byte; case byte of 1: (a,b: byte); 2: (c: word); end; {$A+} // or even a: byte;

Re[2]: [fpc-pascal] variant part of a record

2006-09-20 Thread Пётр Косаревский
Yes, there is a language feature called object orientation. But still that means you would have to translate the binary structure into a class instance somehow. Vinzent. The object I presented compiles well, but there is almost no gain in OO approach: I still have to nest structures and

Re: Re[2]: [fpc-pascal] variant part of a record

2006-09-20 Thread Jonas Maebe
On 20 sep 2006, at 13:20, Пётр Косаревский wrote: I'm vague: for the first time I hoped that when you access the variant part, if the case variable was named, program checks it run-time. Hoping that it was implemented this way, I asked about control over the relative place in the memory

Re[2]: [fpc-pascal] variant part of a record

2006-09-20 Thread Пётр Косаревский
About contributing: is it useful to comment some parts of documentation (html with comments) with improvements, corrections or compilable examples? It's not because you don't pay me, or because you cannot demand anything from me or anyone else working on FPC, that you do not have

Re[2]: [fpc-pascal] variant part of a record

2006-09-19 Thread Пётр Косаревский
Yes, you do. :) Nevertheless some_type = record case Something : byte of 1: (x,y: word); 2: (z: longword); end; Thank you, Jonas and Vincent, but I was vague: what I want is blockread'ing, so I have to use record Something: byte; case byte of 1: (x,y: