Re: [fpc-devel] type question

2006-10-14 Thread Christian Iversen
On Sunday 15 October 2006 00:42, peter green wrote: > > In the case of wrapper integers in records, are 4-byte records handled as > > efficiently by the compiler as 4-byte integers? I suspect it's > > some radically > > different code that handles it. > > test it? That would require me to actually

RE: [fpc-devel] type question

2006-10-14 Thread peter green
> In the case of wrapper integers in records, are 4-byte records handled as > efficiently by the compiler as 4-byte integers? I suspect it's > some radically > different code that handles it. test it? ___ fpc-devel maillist - fpc-devel@lists.freepasc

Re: [fpc-devel] type question

2006-10-14 Thread Peter Vreman
At 23:00 14-10-2006, you wrote: On Saturday 14 October 2006 17:38, Peter Vreman wrote: > > On Saturday 14 October 2006 15:55, Marc Weustink wrote: > >> Hi, > >> > >> if I define 2 types like: > >> > >> type > >> MyA = type string; > >> MyB = type string; > >> > >> are MyA and MyB considered a

Re: [fpc-devel] type question

2006-10-14 Thread Christian Iversen
On Saturday 14 October 2006 17:38, Peter Vreman wrote: > > On Saturday 14 October 2006 15:55, Marc Weustink wrote: > >> Hi, > >> > >> if I define 2 types like: > >> > >> type > >> MyA = type string; > >> MyB = type string; > >> > >> are MyA and MyB considered as the same type ? > > > > No, you

Re: [fpc-devel] type question

2006-10-14 Thread Marc Weustink
Florian Klaempfl wrote: > Marc Weustink schrieb: >> Next question: Should operator overloading be possible on such types ? > > Yes. Then I think I found a bug, see 7610 Marc ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freep

Re: [fpc-devel] type question

2006-10-14 Thread Florian Klaempfl
Marc Weustink schrieb: Next question: Should operator overloading be possible on such types ? Yes. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

RE: [fpc-devel] type question

2006-10-14 Thread peter green
ers' list > Subject: Re: [fpc-devel] type question > > > Peter Vreman wrote: > >> On Saturday 14 October 2006 15:55, Marc Weustink wrote: > >>> Hi, > >>> > >>> if I define 2 types like: > >>> > >>> type > >>&g

Re: [fpc-devel] type question

2006-10-14 Thread Marc Weustink
Peter Vreman wrote: >> On Saturday 14 October 2006 15:55, Marc Weustink wrote: >>> Hi, >>> >>> if I define 2 types like: >>> >>> type >>> MyA = type string; >>> MyB = type string; >>> >>> are MyA and MyB considered as the same type ? >> No, you are explicitly marking them as a new type. This is

Re: [fpc-devel] type question

2006-10-14 Thread Peter Vreman
> On Saturday 14 October 2006 15:55, Marc Weustink wrote: >> Hi, >> >> if I define 2 types like: >> >> type >> MyA = type string; >> MyB = type string; >> >> are MyA and MyB considered as the same type ? > > No, you are explicitly marking them as a new type. This is a very cool > feature > of P

Re: [fpc-devel] type question

2006-10-14 Thread Ivo Steinmann
Marc Weustink wrote: program TypeTest; {$mode objfpc}{$h+} type TMyA = type String; TMyB = type String; var A: TMyA; B: TMyB; S: String; begin S := 'Some value'; A := S; B := S; S := A; S := B; A := B; B := A; end. Well, assign works, but if you use them as var Pa

Re: [fpc-devel] type question

2006-10-14 Thread Marc Weustink
Christian Iversen wrote: > On Saturday 14 October 2006 15:55, Marc Weustink wrote: >> Hi, >> >> if I define 2 types like: >> >> type >> MyA = type string; >> MyB = type string; >> >> are MyA and MyB considered as the same type ? > > No, you are explicitly marking them as a new type. This is a

Re: [fpc-devel] type question

2006-10-14 Thread Christian Iversen
On Saturday 14 October 2006 15:55, Marc Weustink wrote: > Hi, > > if I define 2 types like: > > type > MyA = type string; > MyB = type string; > > are MyA and MyB considered as the same type ? No, you are explicitly marking them as a new type. This is a very cool feature of Pascal you wont fi

[fpc-devel] type question

2006-10-14 Thread Marc Weustink
Hi, if I define 2 types like: type MyA = type string; MyB = type string; are MyA and MyB considered as the same type ? Should it be allowed to assign a variable of type MyA to a variable of type MyB ? IIRC, the use of = type creates a new type. Or am I wrong ? Marc