DOUBLEARG

Section: C Library Functions (3)
Updated: 12/5/79
Index Return to Main Contents
 

NAME

doublearg, floatarg - parse floating-point value or ask user  

SYNOPSIS

#include <ctype.h>

double doublearg (ptr,brk,prompt,min,max,defalt);
char **ptr,*brk,*prompt;
double min,max,defalt;

float floatarg (ptr,brk,prompt,min,max,defalt);
char **ptr,*brk,*prompt;
float min,max,defalt;  

DESCRIPTION

Doublearg and floatarg attempt to parse an argument from a string, passing the string pointer ptr and the break character seg brk to the nxtarg(3) routine. If there is an argument parsed, and it is a legal floating-point value between min and max, then it is returned by doublearg or floatarg. If there is no argument, or if it is not a valid floating-point number, or if it is out of range, then an error message is printed and the routine getdouble(3) or getfloat(3) is passed the remaining parameters; the value returned by getdouble or getfloat is then returned by doublearg or floatarg.

Doublearg and floatarg are epxecially useful for parsing floating-point values from argument lists in programs using the command interpreter, ci(3).  

SEE ALSO

nxtarg(3), getdouble(3), getfloat(3), ci(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:50:55 GMT, May 26, 2025