If you mean what C# calls "ref", then pass

&x

instead of just 'x'. 'x' should be declared as mutable

let mutable x = ...

See also

[link:lorgonblog.spaces.live.com]

[link:msdn.microsoft.com]

[link:blogs.msdn.com]

since you are coming from a C# background.

By on 6/7/2010 10:13 AM ()

Other than inter-op reason(like the TryFind etc. in .NET dictionary), why would one want to pass a mutable ref to a function ?

Personally, I found it a very confusing coding style.

By on 6/7/2010 1:31 PM ()

&X seems to work fine, thanks.

By on 6/7/2010 2:09 PM ()
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