hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

command line args

Last post 04-24-2007, 1:16 by rakosnik. 2 replies.
Sort Posts: Previous Next
  •  04-23-2007, 8:31 2909

    command line args

    hi, i'm beginer in F#.
    i have to write an application, which have to working with data placed in some file. name of this file is given by command line argument. And here is my problem: i don't know how to read command line arguments in F#. is here anybody who can help me with short example?

    thanks 

  •  04-23-2007, 9:09 2911 in reply to 2909

    Re: command line args

    Use Sys.argv (which an array).

    #light


    let _ =
      print_endline Sys.argv.[0] // the program name
      Array.iter (printf "%s ") Sys.argv // print all

  •  04-24-2007, 1:16 2916 in reply to 2911

    Re: command line args

    great. thanks a lot.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems