[fpc-pascal] Why does this work?

2013-04-12 Thread Reinier Olislagers
As a certified high-level coder with a fear for anything that smells like pointers and bits I hesitated to post this as the answer may well be: figure it out yourself, it's obvious ;)... but at least it's worth a laugh to you bitpushers out there. Have mercy ;) Going through the dbase code, I hit

Re: [fpc-pascal] Why does this work?

2013-04-12 Thread Marco van de Voort
In our previous episode, Reinier Olislagers said: > multiple bytes (apparently stored BE: the first field goes into the > lower byte, the 8th field in the next byte). > > > I have a lot of trouble with shr and shl going on. The first line > seemingly drops the three lower bits... but why? > ... a

Re: [fpc-pascal] Why does this work?

2013-04-12 Thread Ludo Brands
On 04/12/2013 11:47 AM, Reinier Olislagers wrote: > if (FNullField <> nil) and (Dst = nil) and (AFieldDef.NullPosition >= > 0) then > begin > Src := PChar(Src) + FNullField.Offset + (AFieldDef.NullPosition shr 3); > Result := (PByte(Src)^ and (1 shl (AFieldDef.NullPosition and $7))) = 0

[fpc-pascal] Re: Why does this work?

2013-04-12 Thread Reinier Olislagers
On 12-4-2013 12:01, Ludo Brands wrote: > On 04/12/2013 11:47 AM, Reinier Olislagers wrote: >> if (FNullField <> nil) and (Dst = nil) and (AFieldDef.NullPosition >= >> 0) then >> begin >> Src := PChar(Src) + FNullField.Offset + (AFieldDef.NullPosition shr 3); >> Result := (PByte(Src)^ an

Re: [fpc-pascal] RE: 64 bit cross binutils on a 32 bit OS

2013-04-12 Thread waldo kitty
On 4/12/2013 02:44, leledumbo wrote: why use cygwin when mingw is available? Highly *nix tied programs that needs quick porting can use it (e.g.: those that use X11). ok... what is the difference between the two? MinGW doesn't implement the *nix layer (Msys does, though only for the shell

Re: [fpc-pascal] RE: 64 bit cross binutils on a 32 bit OS

2013-04-12 Thread Tomas Hajny
On Fri, April 12, 2013 17:45, waldo kitty wrote: > On 4/12/2013 02:44, leledumbo wrote: >>> can i compile an app with either one and then run that app natively on >> winwhatever /without/ having to install either cygwin or mingw? >> >> All Cygwin binaries depend on cygwin1.dll, so you must distribu