Subject | RE: [Firebird-Architect] Enumerated Types |
---|---|
Author | Paulo Gaspar |
Post date | 2003-08-01T15:32:42Z |
/* Somehow this looks better to me, and you can
still use any "os*" literal directly as a byte/word: */
const
osQuotation = $01;
osOrder = $02;
osDelivered = $03;
osInvoiced = $04;
type
TOrderStatus = (osQuotation,osOrder,osDelivered,osInvoiced);
TOrderStatuses = Set of TOrderStatus;
/*
Have fun,
Paulo Gaspar
*/
still use any "os*" literal directly as a byte/word: */
const
osQuotation = $01;
osOrder = $02;
osDelivered = $03;
osInvoiced = $04;
type
TOrderStatus = (osQuotation,osOrder,osDelivered,osInvoiced);
TOrderStatuses = Set of TOrderStatus;
/*
Have fun,
Paulo Gaspar
*/
> -----Original Message-----
> From: Arno Brinkman [mailto:firebird@...]
> Sent: terça-feira, 15 de Julho de 2003 11:28
> To: Firebird-Architect@yahoogroups.com
> Subject: Re: [Firebird-Architect] Enumerated Types
>
> ...
>
> I use this in delphi :
>
> type
> TOrderStatus = $01..$04;
> TOrderStatuses = set of TOrderStatus;
>
> const
> osQuotation = TOrderStatus($01);
> osOrder = TOrderStatus($02);
> osDelivered = TOrderStatus($03);
> osInvoiced = TOrderStatus($04);
>
> Now jou can just store integers in your database and easy assign
> it to your
> types in Delphi.
>
>
> Regards,
> Arno Brinkman
> ABVisie