Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #232 Read a command line boolean flag

Print "verbose is true" if the flag -v was passed to the program command line, "verbose is false" otherwise.

print("verbose is ${args.contains("-v")}");

New implementation...
< >
programming-idioms.org