| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

env_get_number

#include "sflenv.h"
long
env_get_number (
    const char *name,
    long default_value)

Synopsis

Translates the specified environment variable and returns the long numeric value of the string. If the variable is not defined in the environment, returns the specified default value. The environment variable name is always translated into upper case.

Examples

    max_retries = env_get_number ("retries", 5);

Source Code - (sflenv.c)

{
    char
        *variable_value;

    variable_value = env get string (name, NULL);
    return (variable_value? atol (variable_value): default_value);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation