[fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
Hello, I have a quick question: are there (m)any people here who store/load sets to/from files? The reason is that we are considering to change the internal format of sets in FPC on big endian machines. The reason is that this would be necessary to allow byte-packing of sets (so that e.g.

Re: [fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
On 14 nov 2006, at 13:15, Tom Verhoeff wrote: For purposes of converting between one representation and the other, it might be nice to provide a means to declare "old"sets, which use the current representation, _alongside_ the new sets, which use the improved representation. Then it would

Re: [fpc-pascal] Set format

2006-11-14 Thread Marco van de Voort
> On 14 nov 2006, at 12:32, Ewald Horn wrote: > > > is it possible to keep a legacy reader in place ? That way it'll be > > easy to read old data and convert it to the new format and have > > little impact on historic data. If you happen to work on a big > > endian machine you could then do

Re: [fpc-pascal] Set format

2006-11-14 Thread Tom Verhoeff
On Tue, Nov 14, 2006 at 11:47:37AM +0100, Jonas Maebe wrote: > > I have a quick question: are there (m)any people here who store/load > sets to/from files? I do not mix sets and files, but I do mix sets and Single/Double in a record to decompose floating point numbers. However, I don't see a b

Re: [fpc-pascal] Set format

2006-11-14 Thread Ewald Horn
Hi, is it possible to keep a legacy reader in place ? That way it'll be easy to read old data and convert it to the new format and have little impact on historic data. If you happen to work on a big endian machine you could then do a once-off conversion. Kind regards Ewald Horn

Re: [fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
On 14 nov 2006, at 12:32, Ewald Horn wrote: is it possible to keep a legacy reader in place ? That way it'll be easy to read old data and convert it to the new format and have little impact on historic data. If you happen to work on a big endian machine you could then do a once-off convers

Re: [fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
On 14 nov 2006, at 13:31, Vincent Snijders wrote: A set of 0..63 requires 64 bits, doesn't it? Yes, my mistake. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
On 14 nov 2006, at 13:20, Marco van de Voort wrote: is it possible to keep a legacy reader in place ? That way it'll be easy to read old data and convert it to the new format and have little impact on historic data. If you happen to work on a big endian machine you could then do a once-off conv

Re: [fpc-pascal] Set format

2006-11-14 Thread Marco van de Voort
> On 14 nov 2006, at 13:20, Marco van de Voort wrote: > > >>> is it possible to keep a legacy reader in place ? That way it'll be > >>> easy to read old data and convert it to the new format and have > >>> little impact on historic data. If you happen to work on a big > >>> endian machine you coul

Re: [fpc-pascal] Set format

2006-11-14 Thread Marco van de Voort
Another question, do you intend to fix the other size problem too? (another Delphi incompatability) I mean by this sets of x..y having a size of roundup((y-z+1)/8) with z as x rounded down to the lower multiple of 8. IOW, a set of 79..83 is two bytes in delphi. ___

Re: [fpc-pascal] Set format

2006-11-14 Thread Florian Klaempfl
Marco van de Voort schrieb: > Another question, do you intend to fix the other size problem too? (another > Delphi incompatability) > > I mean by this sets of x..y having a size of roundup((y-z+1)/8) with z as > x rounded down to the lower multiple of 8. > > IOW, a set of 79..83 is two bytes i

Re: [fpc-pascal] Set format

2006-11-14 Thread Vincent Snijders
Jonas Maebe schreef: Hello, sets in FPC on big endian machines. The reason is that this would be necessary to allow byte-packing of sets (so that e.g. a set of 0..63 would only occupy 1 byte as opposed to 4 like is currently the case). A set of 0..63 requires 64 bits, doesn't it? So it woul

Re: [fpc-pascal] Set format

2006-11-14 Thread Den Jean
On Tuesday 14 November 2006 11:47, Jonas Maebe wrote: > Hello, > > I have a quick question: are there (m)any people here who store/load > sets to/from files? It would be nice to have an option like {$MINENUMSIZE xxx} so that binary compatibility with frequently used bitmasks in C APIs is easier

Re: [fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
On 14 Nov 2006, at 22:04, Den Jean wrote: so that binary compatibility with frequently used bitmasks in C APIs is easier Aren't bitpacked records/arrays more appropriate for that? Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] Set format

2006-11-14 Thread Daniël Mantione
Op Tue, 14 Nov 2006, schreef Jonas Maebe: > > On 14 Nov 2006, at 22:04, Den Jean wrote: > > > so that binary compatibility with frequently used > > bitmasks in C APIs is easier > > Aren't bitpacked records/arrays more appropriate for that? Semantically speaking, no. Daniël__

Re: [fpc-pascal] Set format

2006-11-14 Thread Jonas Maebe
On 14 Nov 2006, at 23:12, Daniël Mantione wrote: Op Tue, 14 Nov 2006, schreef Jonas Maebe: On 14 Nov 2006, at 22:04, Den Jean wrote: so that binary compatibility with frequently used bitmasks in C APIs is easier Aren't bitpacked records/arrays more appropriate for that? Semantically spe