I would like to compile my ML program into a executable binary using mosmlc. However, I could not find much information on how to do it.
The code that I’d like to compile is here http://people.pwf.cam.ac.uk/bt288/tick6s.sml
cx,cy,s,imgLocation are 4 arguments that I’d like to take from command line arguments. For instance, if the program is compiled with name mandelbrot, input bash$mandelbrot -0.5 0.15 0.0099 image.png should execute the main function.
You should be able to put this code into a file
foo.smland runTo get the command-line arguments you want function
CommandLine.arguments, so, e.g.,You’ll have to write your own
usagefunction.P.S. If you have access to
mosmlc, you probably also have access to the interactivemosml, which has an incredibly usefulhelpfunction with typestring -> unit.