Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/usage|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] == usage A very small and simple helper to create usage messages == Author [[/users/mario-domenech-goulart|Mario Domenech Goulart]] == License BSD == Requirements None == Procedures <procedure>(make-usage helper)</procedure> Returns a procedure that, when called, prints a usage message for the running program. The usage message is the retun value of {{helper}}, a one-argument procedure which receives the program name (with the directory stripped) as argument. The procedure returned by {{make-usage}} can optionally be given a number which indicates the program's exit code. Here's an usage example of usage (considering the code below is in a file called {{usage-test}}): <enscript highlight=scheme> (use usage) (define usage (make-usage (lambda (program) (print #<#EOH Usage: #{program} <options> <options> are: -foo: foobarizes -bar: barbarizes EOH )))) (if (member "-h" (command-line-arguments)) (usage) (usage 1)) </enscript> When run with th {{-h}} command line argument, {{usage-test}} prints the usage message to {{(current-output-port)}}. When run without command line options or with any option which is not {{-h}}, {{usage-test}} prints the usage message to {{(current-error-port)}} and aborts the program with exit code {{1}}. $ csi -s usage-test -h Usage: usage-test <options> <options> are: -foo: foobarizes -bar: barbarizes == Version History ; 0.1 : Initial release
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 9 by 9?