DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T s

⟦1e9a9579c⟧ TextFile

    Length: 602 (0x25a)
    Types: TextFile
    Names: »setreal.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/stat-5.3/eu/stat/src/setreal.c« 

TextFile

/*  Copyright 1984 Gary Perlman */

#include "stat.h"
FUN(setreal,set a real option,5.0,1/5/86)

/*FUNCTION setreal: check type, convert string, and set real option */
setreal (pgm, flag, value, var)
char	*pgm;
int 	flag;    /* the single character option name */
char	*value;  /* the candidate value, in string format */
double	*var;    /* ptr to variable to stuff in answer */
	{
	double	atof ();
	if (number (value)) /* number returns 1 for integers, 2 for reals */
		{
		*var = atof (value);
		return (0);
		}
	fprintf (stderr, "%s: -%c option requires a real value\n", pgm, flag);
	return (2);
	}