Help for IBIS2TCL
PURPOSE
"IBIS2TCL" transfers particular values specified by row and
column from an IBIS interface file to TCL variables. The values
may be transfered in double, real, integer, or character (string) format.
The number of columns and column length may also be transfered
to TCL variables. Whereas the IBIS-1 strings were four characters
long, IBIS-2 character strings are allowed to be up to eighty (80)
characters long.
EXECUTION
ibis2tcl FILE.INT V1=LAT V2=LONG V3=LABEL V4=COUNT IBISLOC=(1,1, 4,3, 2,2, 4,5) VARTYPE=(0,0,2,1)
In this example, the input interface file is FILE.INT. The real values at
(row 1 , col 1) and (row 4 , col 3) in the interface file are put into the
real TCL variables LAT and LONG, respectively. The character data at (2,2)
is transfered to the LABEL string variable, and the integer format data
at (4,5) is transfered to the COUNT integer variable.
The TCL variable names are entered with the name parameters V1, V2, ... , V25.
The variable names can also be entered positionally and real data types
assumed:
ibis2tcl FILE.INT LAT LONG IBISLOC=(5,6,2,1)
IBISLOC can be defaulted in which case the assumed locations start with the
first row and column and continue with all the elements in each row for as
many rows as required to get VARCNT elements:
ibis2tcl FILE.INT A B C D E F VARCNT=6
The number of values put in TCL variables is equal to the number of locations
specified by IBISLOC or is specified by VARCNT if IBISLOC is defaulted;
there should be enough variables listed to accommodate that many. If the
locations are defaulted then VARCNT must be specified.
The number of columns and/or the length of the columns in the interface
file can be transfered to TCL integer variables. Values in the interface
file can be transfered as well.
ibis2tcl FILE.INT LABEL IBISLOC=(6,1) VARTYPE=2 VNCOL=NCOL VCLEN=CLEN
ibis2tcl FILE.INT VCLEN=CLEN
The following procedure is an example of its use:
PROCEDURE
LOCAL LAT TYPE=REAL
LOCAL LONG TYPE=REAL
LOCAL LABEL TYPE=(STRING,4) !4 for IBIS-1, up to 80 for IBIS-2
LOCAL CLEN TYPE=INTEGER
BODY
ibis2tcl FILE.INT LAT LONG LABEL IBISLOC=(1,1,4,3,2,2) VARTYPE=(0,0,2) VCLEN=CLEN
write "LAT = &LAT LONG = &LONG "
write "LABEL = &LABEL"
write "COLUMN LENGTH = &CLEN"
END-PROC
RESTRICTIONS
The TCL variable types must match the type specified with the
VARTYPE parameter.
The TCL variables for the number of columns and the column length
must be of integer type.
The maximum number of TCL variables allowed per execution is 25.
The interface file cannot have more than 1,000,000 rows or 200 columns.
WRITTEN BY: K.F. Evans June 1985
COGNIZANT PROGRAMMER: B.A. McGuffie
REVISION: 3 April 1986
4 AMS (CRI) Jan. 1995 Made portable for UNIX
and added IBIS-2 capabilities
5 BAM June 1998 Increased columns; corrected pdf.
6 BAM Dec. 1998 Allowed for double precision.
PARAMETERS:
INP
Input interface file
V1
The first TCL variable name, etc
IBISLOC
The IBIS rows and columns
VARCNT
The number of variables
VARTYPE
The type for each variable
-1 for double precision,
0 for real,
1 for integer,
2 for character string,
3 for real to integer conversion
VNCOL
The TCL variable name
to get the number of columns
VCLEN
The TCL variable name
to get the column length
See Examples:
Cognizant Programmer: