cdds_switch - retrieve switch definition

SYNOPSIS

#include "cdds.h"

int cdds_switch(switch, default);

const char *switch
const int default

DESCRIPTION

cdds_switch checks the command line (par: dictionary) for the value of a user logical switch specified by switch. If the switch is not given, then the return value will be Default. If the switch is given without a value or if it is given with any one of these values ("1 y Y yes Yes YES t T true True TRUE"), then the return value will be 1. If the switch is given with any one of these values ("0 n N no No NO f F false False FALSE") then the return value will be 0. If a value is given which does not match any of these expected values, the return value will be the default value, Default.

EXAMPLES

int    verbos;
...
/*    check for 'verbose=' on command line  */
verbos = cdds_switch("verbose", 0);
    

SEE ALSO

cdds_scanf Retrieve definition
    

AUTHOR

Jerry Ehlers, BP America (May 2003)