Re: [fpc-pascal] Cross-platform lightweight/fpc SQLite bindings?

2005-10-26 Thread Luiz Américo
Alan Mead wrote: On both Linux and Windows, I'm using the binary libraries from sqlite.org. The bindings themselves fail to compile. It looks like a Windows-specific call is being used. It does not use any windows calls. I just tested in Slackware linux and works OK. Please use the files i

Re: [fpc-pascal] Records

2005-10-26 Thread Vinzent Hoefler
On Wednesday 26 October 2005 10:06, Micha Nelissen wrote: > Vinzent Hoefler wrote: > >>Oh right! Something like a masked compare or so...probably not > >>implementable in an efficient way indeed I guess. > > > > Whatever you call efficient. A simple memory compare won't do, as > > others already po

Re: [fpc-pascal] Records

2005-10-26 Thread Micha Nelissen
Vinzent Hoefler wrote: Oh right! Something like a masked compare or so...probably not implementable in an efficient way indeed I guess. Whatever you call efficient. A simple memory compare won't do, as others already pointed out, and everything else depends on the actual layout of the struct

Re: [fpc-pascal] Records

2005-10-26 Thread Vinzent Hoefler
On Wednesday 26 October 2005 09:26, Micha Nelissen wrote: > Jonas Maebe wrote: > > Yes, but two different variables of the same type could have > > different values for those pad bytes. So you have to compare > > everything but the pad bytes. > > Oh right! Something like a masked compare or so...

Re: [fpc-pascal] Records

2005-10-26 Thread Adriaan van Os
Jonas Maebe wrote: Micha Nelissen wrote: Because you can't simply compare the memory ranges occupied by records A and B. They could have different pad bytes (and bits) but still be the same. Isn't the number of pad bytes a property of a type ? So when two vars are of the same type, they al

Re: [fpc-pascal] Records

2005-10-26 Thread Micha Nelissen
Jonas Maebe wrote: Yes, but two different variables of the same type could have different values for those pad bytes. So you have to compare everything but the pad bytes. Oh right! Something like a masked compare or so...probably not implementable in an efficient way indeed I guess. Mic

Re: [fpc-pascal] Records

2005-10-26 Thread Jonas Maebe
On 26 okt 2005, at 10:11, Micha Nelissen wrote: Because you can't simply compare the memory ranges occupied by records A and B. They could have different pad bytes (and bits) but still be the same. Isn't the number of pad bytes a property of a type ? So when two vars are of the same type

Re: [fpc-pascal] Records

2005-10-26 Thread Micha Nelissen
Adriaan van Os wrote: I have never could understand when this is allowed A1:=A2; Why this is not allowed If A1=A2 then in most Pascal compilers. Because you can't simply compare the memory ranges occupied by records A and B. They could have different pad bytes (and bits) but still be the s

Re: [fpc-pascal] Records

2005-10-26 Thread Carsten Bager
> Adriaan van Os wrote: > > > Carsten Bager wrote: > > > >> We are moving a lot of code from an old platform where it is > >> allowed to compare 2 records like this. > >> > >> Type > >> A_typ=array[0..3] of integer; > >> Var > >> A1,A2:A_typ; > >> > >> Begin > >> If A1=A2 then > >> End; > >>

Re: [fpc-pascal] Records

2005-10-26 Thread Florian Klaempfl
Adriaan van Os wrote: > Carsten Bager wrote: > >> We are moving a lot of code from an old platform where it is >> allowed to compare 2 records like this. >> >> Type >> A_typ=array[0..3] of integer; >> Var >> A1,A2:A_typ; >> >> Begin >> If A1=A2 then >> End; >> >> I know that I can typecast t