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 2 Vol 1

CHECK EQUAL LENGTH

Name:
    CHECK EQUAL LENGTH (LET)
Type:
    Let Subcommand
Purpose:
    Given a list of names, check to see if each name is a currently defined variable and that all of the variables have the same number of elements.
Description:
    Sometimes when writing general purpose macros it may be useful to know if certain names have been defined as variables, and if so, do the variables have the same number of elements.
Syntax:
    LET <iflag> = CHECK EQUAL LENGTH <name1> <name2> ... <namek>
    where <name1> <name2> ... <namek> is a list of 1 to k names;
    and     <iflag> is a parameter where the status is saved.

    If all names are already defined as variables with the same number of elements, <iflag> will be set to 1. Otherwise <iflag> will be set to 0.

Examples:
    LET IFLAG = CHECK EQUAL LENGTH Y X
Note:
    The CALL EXIT and CALL EXIT ALL commands were added to allow you to exit a macro. The status flag from the CHECK EQUAL LENGTH command can be used to determine whether you want to exit from a macro or continue.
Default:
    None
Synonyms:
    None
Related Commands:
    CHECK TYPES = Check the types for a list of names.
    CHECK NAMES = Check whether a list of names have been previously defined.
Applications:
    Data Management
Implementation Date:
    2015/06
Program:
     
    skip 25
    read berger1.dat y x bat
    let iflag = check equal length y x bat
        
    The following output is generated
     
    THE STATUS FLAG FOR CHECK EQUAL LENGTH =        1
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 06/30/2015
Last updated: 06/30/2015

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