ATOBOOL C-3





Copyright (C) 1994-95 Conetic Software Systems, Inc. All names, products, and services mentioned are the trademarks of their respective organizations.



NAME


atobool - convert ASCII to BOOLEAN value

SYNOPSIS


#include 

BOOLEAN atobool (sptr)
char *sptr;

DESCRIPTION


This function converts a string pointed to by sptr to a boolean
value. Atobool converts the string with the format returned by
getfbool(C-3).

A BOOLEAN format has two specifiers. If the string sptr matches
the first specifier, a TRUE (nonzero) value is returned. All
other strings return a FALSE (zero) value. Partial matches are
also considered valid. For example, if the specifier is yes,
strings of y, ye, and yes are all valid.

SEE ALSO


getfbool(C-3), fatobool(C-3)
C/Base Reference Manual Chapter 13, "Formatting Data Values"

NOTES


Strings are compared case insensitive (i.e., Y, YE, YES, and Yes
are also valid for the previous example).