On Dec 21, 2007, at 3:53 PM, ik wrote:

Hi,

On Dec 21, 2007 3:23 PM, Damien Gerard <[EMAIL PROTECTED]> 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.


I like it :)
Thanks !



--
Damien Gerard
[EMAIL PROTECTED]

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)



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to