Ziaw / npad

Nemerle pad. Very simple nemerle IDE for language snippets fast run.
14 stars 8 forks source link

Program falls on some example #2

Closed ghost closed 12 years ago

ghost commented 12 years ago

This example is make program to fall:

using System.Console;

    def _int = 53;
    def _string = "This is a string";
    def _char = 'e';
    def _bool = true;    
    def hexint = 0x63;
    def octalint = 0o12;
    def binaryinteger = 0b110110;
    def signedbyte = 81 : sbyte;
    def unsignedbyte = 122 : byte;
    def smallint = 63 : short;
    def smalluint = 61 : ushort;
    def integer = 353l;
    def usignedint = 351ul;
    def nativeint = 7511 : int;
    def unsignednativeint = 7653 : uint;
    def _long = 12345678912345789L;
    def unsignedlong = 12345678912345UL;
    def float32 = 12.8F;
    def _float = 552.8;
    def lst = [1, 2, 3];

    WriteLine($"int = $_int");
    WriteLine($"string = $_string");
    WriteLine($"char = $_char");
    WriteLine($"bool = $_bool");    
    WriteLine($"hex int = $hexint");
    WriteLine($"HEX INT = $hexint");
    WriteLine($"oct int = $octalint");
    WriteLine($"bin int = $binaryinteger");
    WriteLine($"signed byte = $signedbyte"); 
    WriteLine($"unsigned byte = $unsignedbyte");
    WriteLine($"small int = $smallint");
    WriteLine($"small uint = $smalluint");
    WriteLine($"int = $integer");
    WriteLine($"uint = $usignedint");
    WriteLine($"native int = $nativeint"); 
    WriteLine($"unsigned native int = $unsignednativeint");
    WriteLine($"long = $_long");
    WriteLine($"unsigned long = $unsignedlong");
    WriteLine($"float = $float32");
    WriteLine($"double = $_float");

    WriteLine($"splice integer operations = $(integer * 210 + 1)");
    WriteLine($"list = ..$lst");
    WriteLine($<#list with delimiter = ..$(lst; ";")#>);
    WriteLine($<#list with operations = ..$(lst; "; "; x => $"x * 2 = $(x * 2)")#>);

I see it in the debugger after, there is StackOverflowException in it

Ziaw commented 12 years ago

Thanks, looks like compiler requires run in the separate thread with bigger stack settings.