What's the technical term for the following construct:

What's the technical term for the following construct:

type intx = type integer;
type inty = integer;

What term would you use to describe the difference between intx and inty?

I can't seem to find it in docwiki http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Type_Compatibility_and_Identity_(Delphi)

Comments

  1. Mahdi Safsafi Use a distinct type when you want the compiler to enforce distinct type identity on assignment.

    ReplyDelete
  2. Mahdi Safsafi for compilation error when using wrong typed type.

    ReplyDelete
  3. User-Defined types, to follow the historical denomination http://www.multiwingspan.co.uk/pascal.php?page=types - note that this feature is back to the original Wirth Pascal, and one great advantage over C IMHO http://wiki.freepascal.org/Object_Pascal_History#Wirth_Invents_Pascal

    ReplyDelete

Post a Comment