Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Florian Klaempfl
Am 30.03.2016 um 03:06 schrieb Graeme Geldenhuys: > Thanks Marco, interesting history lesson. ;-) > > On 2016-03-29 22:16, Marco van de Voort wrote: >> Moreover since shorter types are not always faster, I think it is better to >> forget all this, and in new code use INTEGER for the variable types

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Dmitry Boyarintsev
On Tue, Mar 29, 2016 at 9:06 PM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > So I definitely see the benefit in using (U)Int style data types. > They are a lot more obvious [to the programmer] regarding data ranges > and byte size. > Does, it also make the code less high-level? Di

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
Thanks Marco, interesting history lesson. ;-) On 2016-03-29 22:16, Marco van de Voort wrote: > Moreover since shorter types are not always faster, I think it is better to > forget all this, and in new code use INTEGER for the variable types, where > range doesn't matter (much) and (u)int for the r

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Marco van de Voort
In our previous episode, Nikolay Nikolov said: > compatible, changing Cardinal to 16-bit does more harm that good. Many > FPC demos, such as fpctris and samegame now run unmodified on > i8086-msdos. (that's because parts of them, specially gameunit, have M2 origins)

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > types with fields of type Word, Smallint etc, than then some Cardinal > > fields got mixed in too. I would normally use LongWord instead of > > Cardinal to keep to a consistent naming convention. But from your > > comments Cardinal has a long history in

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Nikolay Nikolov
On 03/29/2016 06:13 PM, Marco van de Voort wrote: In our previous episode, Graeme Geldenhuys said: Just curious. What is the history behind the Cardinal data type. As per the FPC documentation, it is always mapped to the LongWord type. I presume it is the same in Delphi. Cardinal is the Wirth

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
Hi Michael, On 2016-03-29 16:18, Michael Van Canneyt wrote: > Longword used to be Cardinal. > I guess it was changed for Delphi compatibility. I really like Sven's idea of using (U)IntX data types where X is 8, 16, 32 or 64 bit. I think this is also future proof, considering Delphi's data type m

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
On 2016-03-29 20:19, Sven Barth wrote: > > I usually use LongWord, too, My preference is based on the fact that they often translate nicely from C code examples and APIs. Plus I know those types and sizes pretty well (at least when in comes to Free Pascal). > but with the recent discovery that

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Sven Barth
Am 29.03.2016 17:27 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2016-03-29 16:13, Marco van de Voort wrote: > > Cardinal is the Wirthian designation for the default unsigned integer, > > just like "integer" is for signed. > > Thanks Marco, that fulfils my curiosity. :) > >

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Dmitry Boyarintsev
On Tue, Mar 29, 2016 at 11:31 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2016-03-29 16:17, Dmitry Boyarintsev wrote: > > In Delphi world LongWord is 64-bit on 64-bit iOS platform and it is > 32-bit > > on 64-bit Windows platform. > > So what happened when they introduced An

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
On 2016-03-29 16:13, Marco van de Voort wrote: > Cardinal is the Wirthian designation for the default unsigned integer, > just like "integer" is for signed. Thanks Marco, that fulfils my curiosity. :) On a side note: The reason I asked this question. I'm working on code with many Record types

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
On 2016-03-29 16:17, Dmitry Boyarintsev wrote: > In Delphi world LongWord is 64-bit on 64-bit iOS platform and it is 32-bit > on 64-bit Windows platform. So what happened when they introduced Android support? Yet another definition or copied one of the others? Regards, - Graeme - _

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Dmitry Boyarintsev
On Tue, Mar 29, 2016 at 11:20 AM, Michael Van Canneyt < mich...@freepascal.org> wrote: > > Which is quite confusing and a really bad decision. > Basic integer types should not depend on the OS. On the CPU, yes. > > I guess they tried to make iOS platform a selling point and be more C-like. Just to

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
On 2016-03-29 16:17, Dmitry Boyarintsev wrote: > In Delphi world LongWord is 64-bit on 64-bit iOS platform and it is 32-bit > on 64-bit Windows platform. > > http://docwiki.embarcadero.com/RADStudio/XE8/en/What's_New#Changes_in_LongInt_and_LongWord_Size_for_64-bit_iOS_Platforms > Wow, that sound

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Michael Van Canneyt
On Tue, 29 Mar 2016, Dmitry Boyarintsev wrote: On Tue, Mar 29, 2016 at 11:06 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: So why does the Object Pascal language have a Cardinal type? Why couldn't LongWord be used instead? In Delphi world LongWord is 64-bit on 64-bit iOS pl

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Michael Van Canneyt
On Tue, 29 Mar 2016, Graeme Geldenhuys wrote: Hi, Just curious. What is the history behind the Cardinal data type. As per the FPC documentation, it is always mapped to the LongWord type. I presume it is the same in Delphi. It used to be opposite, if I recall correctly. Longword used to be

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Dmitry Boyarintsev
On Tue, Mar 29, 2016 at 11:06 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > So why does the Object Pascal language have a Cardinal type? Why > couldn't LongWord be used instead? > In Delphi world LongWord is 64-bit on 64-bit iOS platform and it is 32-bit on 64-bit Windows platfor

Re: [fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > Just curious. What is the history behind the Cardinal data type. As per > the FPC documentation, it is always mapped to the LongWord type. I > presume it is the same in Delphi. Cardinal is the Wirthian designation for the default unsigned integer,

[fpc-pascal] History of the Cardinal data type?

2016-03-29 Thread Graeme Geldenhuys
Hi, Just curious. What is the history behind the Cardinal data type. As per the FPC documentation, it is always mapped to the LongWord type. I presume it is the same in Delphi. So why does the Object Pascal language have a Cardinal type? Why couldn't LongWord be used instead? Regards, - Graem

Re: [fpc-pascal] How to crosscompile i386-linux from X86_64-win64

2016-03-29 Thread Sven Barth
Am 29.03.2016 10:30 schrieb "Jonas Maebe" : > > On 29/03/16 09:58, ulrich wrote: >> >> what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ? > > > It is not possible, because the needed 80 bits extended type is not supported on Win64, and we don't have emulation for this type yet

Re: [fpc-pascal] How to crosscompile i386-linux from X86_64-win64

2016-03-29 Thread Jonas Maebe
On 29/03/16 09:58, ulrich wrote: what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ? It is not possible, because the needed 80 bits extended type is not supported on Win64, and we don't have emulation for this type yet in the compiler. You can follow http://bugs.freepasca

[fpc-pascal] How to crosscompile i386-linux from X86_64-win64

2016-03-29 Thread ulrich
Hi, what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ? When I am trying to compile from "win32" with win32 compiler: c:\Lazarus16\fpc\3.0.0\bin\x86_64-win64\make.exe CROSSCOMPILE=1 CPU_TARGET=i386 OS_TARGET=linux all CROSSBINUTILS=c:\lazarus16\fpc\3.0.0\bin\i386-linux B