NAME

check_num_args - Checks the number of program arguments

SYNOPSIS

#include "l/l_error.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 


void check_num_args
(
	int argc,
	int min_num_args_allowed,
	int max_num_args_allowed,
	const char *usage
);

DESCRIPTION

This routine checks the number of program arguments, and if they are not within the bounds set by the parameters, then it prints and error message to that effect and exits.

NOTE

The ranges are in terms of user arugments which is one less than the value of argc. The first argument is usually the program name, and we don't count that here.

DISCLAIMER

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

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard