[fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Graeme Geldenhuys
Hi, I need a new boolean type in my applications that support three values. True, False and Null. Null value means undefined and has various uses and gets handled differently to True or False. Is this possible in Free Pascal? Regards, - Graeme -

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
type TGraemeBoolean = (dbNil, dbFalse, dbTrue); ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Mattias Gaertner
On Mon, 6 Apr 2009 19:21:50 +0200 Graeme Geldenhuys graemeg.li...@gmail.com wrote: Hi, I need a new boolean type in my applications that support three values. True, False and Null. Null value means undefined and has various uses and gets handled differently to True or False. Is this

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
oh sorry, by i've missprinted prefixes: type TGraemeBoolean = (gbNil, gbFalse, gbTrue); // gb prefix stands for Greame Boolean ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Graeme Geldenhuys
On Mon, Apr 6, 2009 at 7:33 PM, dmitry boyarintsev skalogryz.li...@gmail.com wrote: TGraemeBoolean = (gbNull = -1, gbFalse = 0, gbTrue =1); function dbBool(g: TGrameBoolean): Boolean; inline; function dbAssigned(gTGrameBoolean): Boolean; inline; Dope! Now why didn't I think of that. :-)

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: TGraemeBoolean = (gbNull = -1, gbFalse = 0, gbTrue =1); function dbBool(g: TGrameBoolean): Boolean; inline; function dbAssigned(gTGrameBoolean): Boolean; inline; Dope! Now why didn't I think of that. :-) Thank you very much! Have a

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
Have a look at $packenum btw if you go that way. what's the reason? i guess it's not to be used for streaming operation. btw, is there $packsets? (for sets aligment?) thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Marco van de Voort
In our previous episode, dmitry boyarintsev said: Have a look at $packenum btw if you go that way. what's the reason? i guess it's not to be used for streaming operation. Well, you never know. Shared memory is another possibility btw. btw, is there $packsets? (for sets aligment?) No, not

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
No, not that I know. sets are always 32-bit size? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Marco van de Voort
In our previous episode, dmitry boyarintsev said: No, not that I know. sets are always 32-bit size? Oops I apparantly looked at outdated docs (on scenergy): http://www.freepascal.org/docs-html/prog/progsu59.html#x66-640001.1.59 ___ fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
Oops I apparantly looked at outdated docs (on scenergy): http://www.freepascal.org/docs-html/prog/progsu59.html#x66-640001.1.59 Thanks so much! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread Jonas Maebe
On 06 Apr 2009, at 22:08, Marco van de Voort wrote: Oops I apparantly looked at outdated docs (on scenergy): http://www.freepascal.org/docs-html/prog/progsu59.html#x66-640001.1.59 That documentation is not really complete. The supported settings are: * FIXED, DEFAULT, NORMAL: the default