Type Identity

When one type identifier is declared using another type identifier, without qualification, they denote the same type. Thus, given the declarations type

T1, T2, T3, T4, and Integer all denote the same type. To create distinct types, repeat the word type in the declaration. For example, type TMyInteger = type Integer;

creates a new type called TMyInteger which is not identical to Integer.

Language constructions that function as type names denote a different type each time they occur. Thus the declarations type

create two distinct types, tsi and TS2. Similarly, the variable declarations var

create two variables of distinct types. To create variables of the same type, use var S1, S2: string[10]; or type MyString = string[10]; var

S1: MyString; S2: MyString;

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment