Skip to content

Instantly share code, notes, and snippets.

@rofl0r
Created September 12, 2010 14:33
Show Gist options
  • Select an option

  • Save rofl0r/576154 to your computer and use it in GitHub Desktop.

Select an option

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

rofl0r commented Sep 12, 2010

Copy link
Copy Markdown
Author

./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