Changeset 25766 in project


Ignore:
Timestamp:
01/05/12 09:55:26 (9 years ago)
Author:
Ivan Raikov
Message:

getopt-long doc update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/getopt-long

    r25418 r25766  
    5858the command-line arguments.
    5959
    60 <procedure>(getopt-long ARGS GRAMMAR)</procedure>
     60<procedure>(getopt-long ARGS GRAMMAR [UNKNOWN-OPTION-HANDLER])</procedure>
    6161
    6262Parse the arguments {{ARGS}} according to the argument list grammar
     
    115115is the list of arguments that are not options or option values.
    116116
    117 {{getopt-long}} throws an exception if:
     117Optional keyword argument {{UNKNOWN-OPTION-HANDLER}} is a procedure
     118that receives as an argument a list of all options that were given as
     119input but were unrecognized by the grammar. The default unknown option
     120handler raises an error.
     121
     122
     123By default, {{getopt-long}} throws an exception if:
    118124* it finds an unrecognized property in GRAMMAR
    119125* it finds an unrecognized option in ARGS
     
    122128* an option that doesn't accept an argument does get one (this can only happen using the long option {{--opt=value}} syntax)
    123129* an option predicate fails
     130
     131
    124132
    125133=== Examples
     
    156164=== Version History
    157165
     166* 1.14 Added user-specified unknown option handler
    158167* 1.13 Ensure test script returns proper exit status
    159168* 1.12 Removed defstruct dependency
     
    173182by Ivan Raikov.
    174183
    175  Copyright 2009-2011 Ivan Raikov.
     184 Copyright 2009-2012 Ivan Raikov.
    176185 
    177186 Portions copyright (C) 1998, 2001, 2006 Free Software Foundation,
Note: See TracChangeset for help on using the changeset viewer.