On 13/09/2010 14:16, Florian Klaempfl wrote:
Am 13.09.2010 14:51, schrieb Willibald Krenn:

Well, it's the Delphi way of creating a new type rather than an
alias.

Since they are still assignment compatible, I don't consider it as
a really new type.

Are you sure they are assignment compatible?

I don't have a delphi here, but I'am pretty sure, yes.

It works that way.

The following snippet compiles and gives the expected result in D7

type TMyInteger = type Integer;

procedure TForm1.FormCreate(Sender: TObject);
var my: TMyInteger;
    notmy: integer;
begin
  my := 10;
  notmy := my;
  showmessage(inttostr(notmy));
  showmessage(inttostr(my));
end;

Paulo Costa
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to