you can use ``ignore'' to get rid of the warnings:

1
2
System.Diagnostics.Process.Start("notepad") |> ignore

I think the problem is that the ``this never happends'' line is creating an internal var actionlength. I'm not exactly sure what the intent is here. But, try something like this:

1
2
3
4
5
6
7
8
9
10
11
12
match input with 

    | x when x > actionlength -> baseloop := !baseloop + 99 //this should get called now

    | mlist when mlist < actionlength ->

        System.Diagnostics.Process.Start("notepad") |> ignore

        Console.Clear() 

    | _ -> Console.Clear() 

Try looking at the ``local variables'' window as you step through the debugger, and you'll see that 2 actionlength variables exist inside the match statement.

By on 7/8/2009 1:59 PM ()

yes i see that now two variables with one name and different values in each.

this also works:

match input with

| _ when input > actionlength -> printf "th"

| _ when input %lt actionlength -> printf "thi"

By on 7/8/2009 2:09 PM ()

It is also possible to use a simple if-else, if you aren't matching:

1
2
3
4
if input > actionlength then printf "th"

elif input < actionlength then printf "thi"
By on 7/9/2009 7:12 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