String length limit in F # - error or function?

This code gives you an error in the VS 2010 error list:

let (a: float), (b: float), (c: int), (d: float), (e: float), (f: float), (g: float), (h: float), (i: float), (j: float), (k: float), (l: float), (abcdefghijklmnopqrstabcdefghijklmnopqrstabc: float ) = 0., 0., 0, 0., 0., 0., [], 0., 0., 0., 0., 0., 0., 0.

Adding one character to the last variable as

let (a: float), (b: float), (c: int), (d: float), (e: float), (f: float), (g: float), (h: float), (i: float), (j: float), (k: float), (l: float), (abcdefghijklmnopqrstabcdefghijklmnopqrstabcd: float ) = 0., 0., 0, 0., 0., 0., [], 0., 0., 0., 0., 0., 0., 0.

does not result in an error in the error list.

I have seen this behavior in many ways, but always in long lines. Is it a F # function or is it a mistake?

Aldrich

+3
source share
3 answers

I am using VS2010 shell with November CTP (not quite sure if this new CTP was created for .NET 2.0 or .NET 4.0)

I tested this code in various scenarios, and there is something strange here. But, of course, there are no "functions" here, since, as @Mauricio noted, both of these let-bindings are incorrect.

Interactive

Both give a (almost) correct error for the output:

    float * float * int * float * float * float * float * float * float * float * float * float * float,     float * float * int * float * float * float * float * float * float * float * float * float * float * 'a 13 14

, "" .

" " VS

, , : Program.fs Program2.fs test1 test2, . -squigly (sp?) , FSI , -squigly (, 'd', -squigly).

, let-bindings ( , FSI).

, , (, ) :

+3

Visual Studio F # squiggles 255. F # range , , ( , 511 ); , 100% , .

(, , , .

https://github.com/brianmcn/FSharpDepthColorizer/blob/master/ParseTreeDepth/MyFSParser/MyParsing.fs

267.)

+4

Visual Studio squiggles , F # (fsc.exe). , VS2010 SP1 F # . Visual Studio. :

File.fs(60,213): FS0001: ...

213, ( 255, ), ( ):

File.fs: error FS0001: ...

0

Source: https://habr.com/ru/post/1777064/


All Articles