Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ purec(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

UNPACK DATA RECORD(3P)  —  SUNPHIGS LIBRARY

NAME

UNPACK DATA RECORD − unpack values from a data record into FORTRAN arrays

SYNOPSIS

FORTRAN Syntax

SUBROUTINE purec ( LDR, DATREC, IIL, IRL, ISL, ERRIND, IL, IA, RL, RA, SL, LSTR,
    STR )
INTEGERLDRnumber of array elements used in DATREC
CHARACTER∗80DATREC(LDR) data record
INTEGERIILdimension of integer array
INTEGERIRLdimension of real array
INTEGERISLdimension of character array
INTEGERERRINDOUT error indicator (zero if no error)
INTEGERILOUT number of integer entries
INTEGERIA(IIL)OUT array containing integer entries
INTEGERRLOUT number of real entries
REALRA(IRL)OUT array containing real entries
INTEGERSLOUT number of character string entries
INTEGERLSTR(ISL)OUT length of each character string entry
CHARACTER∗(∗)STR(ISL) OUT character string entries

FORTRAN Subset Syntax

SUBROUTINE purec ( LDR, DATREC, IIL, IRL, ISL, ERRIND, IL, IA, RL, RA, SL, LSTR,
    STR )
INTEGERLDRnumber of array elements used in DATREC
CHARACTER∗80DATREC(LDR) data record
INTEGERIILdimension of integer array
INTEGERIRLdimension of real array
INTEGERISLdimension of character array
INTEGERERRINDOUT error indicator (zero if no error)
INTEGERILOUT number of integer entries
INTEGERIA(IIL)OUT array containing integer entries
INTEGERRLOUT number of real entries
REALRA(IRL)OUT array containing real entries
INTEGERSLOUT number of character string entries
INTEGERLSTR(ISL)OUT length of each character string entry
CHARACTER∗80STR(ISL) OUT character string entries

Required PHIGS Operating States

(∗, ∗, ∗, ∗)

DESCRIPTION

Purpose

UNPACK DATA RECORD is a PHIGS FORTRAN utility function.  It unpacks variable or implementation-dependent data values into FORTRAN arrays from a data record. 

FORTRAN Input Parameters

LDRThe number of 80-character strings used in the DATREC array. 

DATREC
The data record is unpacked from this array of 80-character strings.

IILThe dimension of the INTEGER array IA. 

IRLThe dimension of the REAL array RA. 

ISLThe dimension of the CHARACTER array STR and of the string length array LSTR. 

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

ILThe number of INTEGER entries in the data record. 

IAThe IL INTEGER values are unpacked from the data record into this array. 

RLThe number of REAL entries in the data record. 

RAThe RL REAL values are unpacked from the data record into this array. 

SLThe number of character string entries in the data record. 

LSTRThe lengths of the SL character strings unpacked from the data record into this array. 

STRThe SL character strings are unpacked from the data record into this array.  The FORTRAN subset syntax restricts the STR array to be CHARACTER∗80.  The STR argument is required, even if the number of strings in the data record is 0. 

Execution

UNPACK DATA RECORD unpacks multiple INTEGER, REAL, and CHARACTER string values from a single data record held in contiguous 80-character elements of the DATREC array.  The data record DATREC and the INTEGER LDR typically were output parameters from the same call to a PHIGS FORTRAN SUBROUTINE. 

This scheme allows the FORTRAN function to return variable or implementation dependent data, in simple fixed-format parameters.  An example of a PHIGS FORTRAN function that can return a data record is the FORTRAN ESCAPE function, pesc. 

If the data record is invalid, nothing but ERRIND is returned.  If any of the IA, RA, or LSTR output arrays is not large enough, error 2001 is issued, and only the counts IL, RL, and SL are returned (unless all three output array sizes were specified as zero; in this case, all counts are returned, but no error is issued).  If any string in the data record is longer than an element of the STR output array, the counts and string lengths are returned, and no strings are returned. 

ERRORS

2001FORTRAN: Ignoring function, output parameter size insufficient -- a FORTRAN array or string being passed as an output parameter is too small to contain the returned value.

2003FORTRAN: Ignoring function, invalid data record -- the data record passed PHIGS routine cannot be decoded, or there was a problem encountered when PHIGS was creating a data record, making the result invalid.

SEE ALSO

PACK DATA RECORD (3P)

Sun Release 4.0  —  Last change: 13 July 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026