[fpc-pascal] distinct types and type identifier

2008-01-30 Thread Graeme Geldenhuys
Hi, Below is from the Kylix 3 help. --[ copy ]-- Type identity is almost straightforward. When one type identifier is declared using another type identifier, without qualification, they denote the same type. Thus, given the declarations type T

Re: [fpc-pascal] distinct types and type identifier

2008-01-30 Thread ik
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

Re: [fpc-pascal] distinct types and type identifier

2008-01-30 Thread Graeme Geldenhuys
On 30/01/2008, ik <[EMAIL PROTECTED]> 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 > T

Re: [fpc-pascal] distinct types and type identifier

2008-01-30 Thread Peter Vreman
> On 30/01/2008, ik <[EMAIL PROTECTED]> 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

Re: [fpc-pascal] distinct types and type identifier

2008-01-30 Thread Graeme Geldenhuys
On 30/01/2008, Peter Vreman <[EMAIL PROTECTED]> wrote: > > In case of unique integer types. The types are not the equivalent, > but are still compatible and > will be converted implicitly by the compiler. It unique types affect > procedure overloading. The > following short example demonstrates thi