clig_Float man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

CLIG(1)			      Programmer's Manual		       CLIG(1)

NAME
       ::clig::Float - declare an option with parameters of type float

SYNOPSIS
       package require clig
       namespace import ::clig::*
       setSpec db

       Float  -opt  varname  usage [-c min max] {[-d default ...]  | [-m]} [-r
       rmin rmax]

DESCRIPTION
       The Float command declares -opt to have zero  or	 more  floating	 point
       arguments. The parameters variable and usage as well as the options -c,
       -d and -m are described in clig::String(n).

       -r     instructs the parser to check that arguments given to  -opt  are
	      within  the inclusive range between rmin and rmax.  Special val‐
	      ues for rmin and rmax are -oo and oo" denoting negative and pos‐
	      itive infinity thereby not constraining the parameters of -opt.

       WARNING:	 The implementation of option -d is currently incomplete inso‐
       far, as the specified default values are not checked by clig, i.e.  the
       following would go unnoticed:

	      -d 1.0 -r 500.0 600.0

       In  this	 case,	if  option is not on the command line, the clig parser
       will set variable varname for its caller to the out-of-range value 1.0.
       (Maybe this is a feature?)

       Example use of Float:

	 Float -p prob {list of probabilities adding up to one} \
	     -r 0.0 1.0	 -d 0.1 0.2 0.7 \
	     -c 1 oo

       Please  note,  that the additional constraint requiring the values sum‐
       ming to 1.0 cannot be checked by the parser.

PARSER RESULT
   tcl
       Within a Tcl-script, the parser will set the variable with name varname
       in the stack-frame of its caller if and only if option -opt is found on
       the command line or has a default value.

   C
       The structure returned by the parser contains the slots varnameP,  var‐
       name  and varnameC.  The slot varnameP will be set to a non-zero value,
       if and only if the option -opt is found on the command line  or	has  a
       default value. Otherwise it will be 0. The slot varnameC will be set to
       the number of arguments found for -opt.	If the number of arguments for
       -opt  is	 allowed  to  be greater than 1, slot varname has type float*,
       otherwise it has type float.

SEE ALSO
       clig_Version(n),	 clig_Usage(n),	 clig(1),  clig_Int(n),	 clig_Command‐
       line(n),	 clig_Long(n),	clig_Flag(n),  clig_String(n), clig_Double(n),
       clig_Name(n), clig_Rest(n), clig_Description(n), clig_parseCmdline(n)

Kir				   1.9.11.1			       CLIG(1)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net