SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

TABLE WIDTH

Name:
    TABLE WIDTH
Type:
    Support Command
Purpose:
    Specifies the total width and the number of digits to the right of the decimal point when writing numeric variables with the WRITE command.
Description:
    This is an alternative to the SET WRITE DECIMALS and SET WRITE FORMAT commands. The SET WRITE DECIMALS command requires that all variables be printed with the same format. Although the SET WRITE FORMAT allows more flexibility, it cannot be used for WRITE <RTF/LATEX/HMTL>.

    Up to 200 rows can be specified (if the number of variables being printed is greater than 200, it is recommended that you use the SET WRITE FORMAT command).

    A few comments on what can be specified for <ntot> and <nright>. If NTOT and NRIGHT are the values for a given row, then the following apply:

    1. A value of -99 indicates that the default value should be used (this is 15 for NTOT and 7 for NWIDTH).

    2. If NRIGHT is a positive integer, then Fortran F format will be used (e.g., "3.26").

    3. If NRIGHT is 0, then an integer format will be used.

    4. If NRIGHT is -2, then a G15.7 format will be used. In this case, the Fortran compiler will decide between an F-based format or an E-based format depending on the partiuclar number. If NRIGHT is between -3 and -20, then a Fortran E-based format (Eyy.xx where the absolute value of NRIGHT specifies the "xx").
Syntax:
    TABLE WIDTH <ntot> <nright>
    where <ntot> is a variable that specifies the total width of the field for each column in the WRITE command;
    and <ntot> is a variable that specifies the number of digits to the right of the decimal point for each column in the WRITE command.
Examples:
    TABLE WIDTH 10 30
    TABLE WIDTH 1 15
    TABLE WIDTH 50 63
    TABLE WIDTH COL1 COL2
Default:
    DATAPLOT writes variables using an E15.7 format.
Synonyms:
    None
Related Commands:
    WRITE = Writes variables, parameters, and functions to the screen or to file.
    SET READ FORMAT = Defines a Fortran like format to use in subsequent writes.
    SET WRITE DECIMAL = Specify the number of digits to the right of the decimal point for subsequent writes.
Applications:
    Data Output
Implementation Date:
    6/2009
Program:
     
    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET Y2 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET Y3 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET X = SEQUENCE 1 1 100
    .
    LET NTOTAL = DATA  10 12 12 12
    LET NRIGHT = DATA   0  5  5  5
    TABLE WIDTH NTOTAL NRIGHT
    WRITE TEMP.DAT X Y1 Y2 Y3
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 07/06/2009
Last updated: 11/04/2015

Please email comments on this WWW page to alan.heckert@nist.gov.