NAME

read_dbl_from_file - Reads a double from a file

SYNOPSIS

#include "l/l_io.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int read_dbl_from_file
(
	double *dbl_ptr,
	const char *file_name
);

DESCRIPTION

This routine reads an double from a file. The file should have exactly one double in it other than white space and comment lines. The value of the double pointed to by dbl_ptr is only changed if the routine is succeeds.

RETURNS

ERROR on error, with an error message being set, otherwise NO_ERROR. Failures inlude the file does not exist, cannot be opened for reading, and does not have exactly one valid double other than white space and comment lines.

NOTE

This routine and read_double() are somewhat redundant. Currently, this routine insists that there is exactly one number in the file, but read_double() does not.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

set_program_prompt , kjb_query , print_blanks , rep_print , count_real_lines , count_data_lines_until_next_header , count_tokens_in_file , get_real_line , string_count_real_lines , string_get_real_line , get_command_text , add_line_to_input_stream , read_int_from_file , push_no_overwrite , pop_no_overwrite , set_no_overwrite , get_no_overwrite