Re: Converting Pascal to C++, C# or VB

Hans-Peter Diettrich <DrDiettrich@compuserve.de>
10 Apr 2006 00:16:39 -0400

          From comp.compilers

Related articles
[7 earlier articles]
Re: Converting Pascal to C++, C# or VB martin@gkc.org.uk (Martin Ward) (2006-04-08)
Re: Converting Pascal to C++, C# or VB neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2006-04-08)
Re: Converting Pascal to C++, C# or VB thompgc@gmail.com (thompgc@gmail.com) (2006-04-08)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-09)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-09)
Re: Converting Pascal to C++, C# or VB marcov@stack.nl (Marco van de Voort) (2006-04-09)
Re: Converting Pascal to C++, C# or VB DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-04-10)
Re: Converting Pascal to C++, C# or VB gneuner2@comcast.net (George Neuner) (2006-04-10)
Re: Converting Pascal to C++, C# or VB englere.geo@yahoo.com (Eric) (2006-04-12)
Re: Converting Pascal to C++, C# or VB hebisch@math.uni.wroc.pl (Waldek Hebisch) (2006-04-12)
Re: Converting Pascal to C++, C# or VB oliver@first.in-berlin.de (Oliver Bandel) (2006-04-14)
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich@compuserve.de>
Newsgroups: comp.compilers
Date: 10 Apr 2006 00:16:39 -0400
Organization: Compilers Central
References: 06-04-017 06-04-039
Keywords: Pascal

Eric wrote:


> Regardling procedural parameters, the .NET CLR supports delegates,
> which are strongly typed pointers to functions. I always thought Pascal
> was strongly typed until I started working with .NET - they've taken it
> to the next level. You can't cast a delegate to make it point to an
> incompatible function, which is definitely possible in Delphi. Anytime
> you cast in .NET it has to be a cast to a compatible type, or you'll
> get a runtime exception.


Can you please explain your Delphi specific statement?


Delphi has procedural types, for both ordinary procedures and methods,
with according compile time checks, so that runtime checks are not
required. There exist very few ways (and needs) to fool the compiler,
which exist in every language or compiler, which support unchecked type
casts or unmanaged code (for portability reasons). In addition Delphi
distinguishes .NET from Win32 code, so that it's not clear whether you
address the .NET or Win32 compiler of Delphi, and whether or not it's
possible to turn off support for legacy syntax and semantics. I'm only a
Delphi for Win32 user, therefore my ignorance and questions about the
.NET compiler...


DoDi



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.