[Info-vax] First ship poll: When will the first native x86-64 compilers ship ?
Arne Vajhøj
arne at vajhoej.dk
Wed Apr 13 19:32:24 EDT 2022
On 4/13/2022 6:39 PM, Single Stage to Orbit wrote:
> On Wed, 2022-04-13 at 14:42 -0400, Arne Vajhøj wrote:
>> You forgot Pascal!
>
> Nice language,
Yes.
> it must be the only one I'm aware of that allows nested
> procedures and functions. I've not met another programming language
> that allows that.
C# allows something similar since version 7 (non-static) / 8 (static).
This works:
using System;
namespace E
{
public class C
{
public int M1()
{
int M()
{
return 1;
}
return M() + 1;
}
public int M2()
{
int M()
{
return 2;
}
return M() + 2;
}
}
public class Program
{
public static void Main(string[] args)
{
C o = new C();
Console.WriteLine("{0} {1}", o.M1(), o.M2());
}
}
}
The two M's are local in M1 and M2 respectively.
Arne
More information about the Info-vax
mailing list