That's really weird because I could run the source code on both linux with mono and windows with vs2010.

Mono JIT compiler version 2.4.2.3 (Debian 2.4.2.3+dfsg-2)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none

Microsoft (R) F# 2.0 Compiler build 2.0.0.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

The result from both platform was:

multiplication aggregate: 15
aggregate values: 120

By on 5/21/2010 3:53 AM ()

Hmm,

Here's another tidbit of info. The problem only occurs when I run the program interactively as an fsx file. If I compile it with fsc it works properly.

This is on OS X 10.6.3

Pretty weird.

Derek

By on 5/22/2010 12:40 PM ()

Define "doesn't work". (doesn't compile? throws an exception at runtime? ...)

By on 5/19/2010 9:04 PM ()

By doesn't work I mean it prints out the wrong answer.

with let abc commented out the function prints out values 0 & 1 which are wrong. If I uncomment that line the function returns 15 and 120 which is correct.

Derek

By on 5/19/2010 11:22 PM ()

I've seen some odd problems with F# under Mono but nothing of this sort. If I were you I'd look at the generated IL and see if that shows you anything.

By on 5/20/2010 5:58 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