What is that syntax used for?

By on 9/3/2008 5:45 PM ()

It's a binding expression. From the spec, 6.7.1:

If multiple bindings are used, the variables bound are only in scope in body-expr. For example, the following is

legal:

let x = 1 and y = 2 in x+y

By on 9/3/2008 6:00 PM ()

Experimenting, I see it works if 'and' is on a new line indented the same amount as 'let'.

Offhand, I am not sure if this is a bug in the spec or the compiler (most likely this is an intentional change and the spec was not updated in that example).

By on 9/3/2008 10:28 PM ()

FSI now uses the "#light" option by default. When using the #light option, each "and" must be placed on a new line.

Thanks

Don

By on 9/4/2008 7:09 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper