Skip to content

Instantly share code, notes, and snippets.

@rofl0r
Created September 12, 2010 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rofl0r/576154 to your computer and use it in GitHub Desktop.
Save rofl0r/576154 to your computer and use it in GitHub Desktop.
import text/Opts
import structs/ArrayList
main: func(args : ArrayList<String>) {
opts := Opts new(args)
if (opts set?("g")) println("g set")
if (opts set?("v")) println("v set")
if (opts set?("vv")) println("vv set")
if (opts set?("dce")) println("dce set")
if (opts set?("gc")) println("gc set to " + opts get("gc"))
"other options:" println()
opts args each(|arg| arg println())
"=========" println()
opts toString() println()
}
@rofl0r
Copy link
Author

rofl0r commented Sep 12, 2010

./Optstest -g -v -x -dce anal.ooc -gc=dynamic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment