DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME:  A2B - convert ascii floats to binary 				
AUTHOR: Juan Lorenzo (Perl module only)

DESCRIPTION: 
Version: 0.0.4
Package used for interactive velocity analysis

DATE:   Nov 1 2012,
        sept. 13 2013
        oct. 21 2013
        July 15 2015 

USE

NOTES

Examples

SEISMIC UNIX NOTES

 A2B - convert ascii floats to binary 				

 a2b <stdin >stdout outpar=/dev/null 				

 Required parameters:						
 	none							

 Optional parameters:						
 	n1=2		floats per line in input file		

 	outpar=/dev/null output parameter file, contains the	
			number of lines (n=)			
 			other choices for outpar are: /dev/tty,	
 			/dev/stderr, or a name of a disk file	

 Credits:
	CWP: Jack K. Cohen, Dave Hale
	Hans Ecke 2002: Replaced line-wise file reading via gets() with 
			float-wise reading via fscanf(). This makes it 
			much more robust: it does not impose a specific 
			structure on the input file.

CHANGES and their DATES

sub Step

collects switches and assembles bash instructions by adding the program name

sub note

collects switches and assembles bash instructions by adding the program name

sub clear

subroutine floats_per_line

you need to know how many numbers per line
will be in the output file 

sub n1

you need to know how many numbers per line
will be in the output file 

sub outpar

sets  how to redirect metadata
to either screen, a file, stderr, or 
to be lost.

Internally, determine whether we have a string or a reference to an array

sub get_max_index

max index = number of input variables -1