[fpc-pascal] Type declaration

ik idokan at gmail.com
Fri Dec 21 15:53:28 CET 2007


Hi,

On Dec 21, 2007 3:23 PM, Damien Gerard <milipili at shikami.org> wrote:
>
> Hi !
>
> I would like to know if there are any differences between these two
> following declarations :
>
> type
>     TMyType = smallint;

This is an "alias" to smallint, giving it a new way reference it.

>
> And
>
> type
>    TMyType = type smallint;

This is a new type, that have the range of smallint, but they are not
the same. If you will place a TMyType variable inside a smallint
paremeter you might have an error or warning of type mismatch.

>
>
> --
> Damien Gerard
> milipili at shikami.org
>
> People who used magic without knowing what they were doing usually
> came to a sticky end. All over the entire room, sometimes.
>      -- (Terry Pratchett, Moving Pictures)
>


Ido
-- 
http://ik.homelinux.org/



More information about the fpc-pascal mailing list