[fpc-pascal] distinct types and type identifier

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jan 30 11:05:01 CET 2008


On 30/01/2008, ik <idokan at gmail.com> wrote:
> type
>   TfpgColor = type longword;
>
> means that you have a new type in the same *range* of longword. That
> means that you can assign the same number range, but if you have a
> variable that is a longword, and you wish to assigned the value to a
> TfpgColor, then you must cast it, or the compiler will tell you that
> it expect a TfpgColor content (unless there is a bug ;)).


Ah, okay. Now why can't they explain it like you just did, but in the
help. :) Where could I add this explanation in the FPC docs?

I think I'll use the type as define above from now onwards... That way
we should always know what we are working with (TfpcColor in this
case) when assigning values to variables etc.

Thanks Ido!


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list