Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

string is int f#

let str = Console.ReadLine()
match int.TryParse str with
| true, num -> printfn "%i" num
| _ -> failwithf "'%s' is not an integer" str 
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #string #int
ADD COMMENT
Topic
Name
1+7 =