You will either have to use the string literal itself in your pattern matching expressions or you will have to resort to a when clause.

1
2
3
4
5
6
7
8
9
10
11
12
13
let numericOrAll kv = 
    match kv with
    | Integer, Integer -> true
    | Integer, "*"     -> true
    | "*",     Integer -> true
    | _                -> false

let numericOrAll kv = 
    match kv with
    | Integer, Integer             -> true
    | Integer, x when x = rangeAll -> true
    | x, Integer when x = rangeAll -> true
    | _ -> false

See this thread for more discussion.

By on 1/13/2009 4:52 AM ()

Thanks!

By on 1/13/2009 4:59 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