fork download
  1. open System
  2.  
  3. let wordcount() = 1
  4. let wordcounthelp() = 1
  5. let touch() = 1
  6. let touchhelp() = 1
  7. let version() = 1
  8.  
  9. module Main =
  10. let rec commandmenu() =
  11. printfn "Select a command"
  12. printfn "1. Word count Command - Word count"
  13. printfn "2. Word count Command help"
  14. printfn "3. Touch Command - Touch file"
  15. printfn "4. Touch Command help"
  16. printfn "5. Version"
  17. printfn "6. Quit"
  18. printfn "--------------------------------"
  19. printfn "Select option (Eg '1','5') "
  20.  
  21.  
  22. let optionselect = Console.ReadLine()
  23. match System.Int32.TryParse optionselect with
  24. | (true, number) when number = 1
  25. -> wordcount()
  26. // printf"Press any key to continue"
  27. | (true, number) when number = 2
  28. -> wordcounthelp()
  29.  
  30. | (true, number) when number = 3
  31. -> touch()
  32.  
  33. | (true, number) when number = 4
  34. -> touchhelp()
  35.  
  36. | (true, number) when number = 5
  37. -> version()
  38. | (true, number) when number = 6
  39. -> 0 //Exit code
Success #stdin #stdout 0.01s 14772KB
stdin
6
stdout
Standard output is empty