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

FILE NAME QUOTE

Name:
    FILE NAME QUOTE (SET)
Type:
    Set Subcommand
Purpose:
    Specify whether or not file names may be enclosed in double quotes (").
Description:
    The READ, WRITE, CAPTURE, CALL/CREATE and LIST commands can accept file names as arguments. Many current operating systems allow path and file names to contain embedded spaces. In particular, Windows on the PC uses spaces in many common path names. Typically, when Dataplot parses a file name, it treats the next space character as the end of the file name. Enclosing the file name in quotes allows the file name to contain spaces.

    For the WRITE command, we can have something like

     
    WRITE   "   string to printed  "
        

    In this case, we do not want the quotes to be interpreted as enclosing a file name. The SET FILE NAME QUOTE is used to address this ambiguity. If the command

      SET FILE NAME QUOTE ON

    is given, then if the first character in the file name is a double quote, Dataplot treats all characters until the next double quote as the file name (the quotes are not part of the file name).

      SET FILE NAME QUOTE OFF

    is given, Dataplot treats any quotes as signifying the start of a literal string to be printed.

    The READ, CAPTURE, CALL/CREATE and LIST commands do not have this ambiguity. For these commands, the value for SET FILE NAME QUOTE is automatically set to ON.

    For the WRITE command, the default is OFF. This is so that WRITE commands that contain quotes for literal strings will still work if the embedded string contains a "." (a period is the signifier that a string denotes a file name).

Syntax:
    SET FILE NAME QUOTE <ON/OFF>
    where <ON> specifies that file names may be embedded with quotes and <OFF> specifies that quotes do not delineate file names.
Examples:
    SET FILE NAME QUOTE ON
    SET FILE NAME QUOTE OFF
Note:
    Dataplot treats hyphens as delimiters as well. So if the file name contains hyphens, you need to enclose it in quotes.
Default:
    This switch is OFF by default for the WRITE command. The switch is automatically set to ON for READ, LIST, CALL/CREATE and CAPTURE commands.
Synonyms:
    None
Related Commands:
    READ = Read data from a file.
    WRITE = Write data to a file.
    CAPTURE = Re-direct alphanumeric output to a file.
    LIST = List the contents of a file.
    CALL = Execute commands stored in a file.
Applications:
    Data Input/Output
Implementation Date:
    2002/07
    2003/08: The READ, CAPTURE, and LIST commands automatically set this switch to ON.
Program:
     
    SET FILE NAME QUOTE ON
    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET Y2 = CAUCHY RANDOM NUMBERS FOR I = 1 1 100
    WRITE "C:\My Data\TEST.DAT"  Y1 Y2
    LIST "C:\My Data\TEST.DAT"
    READ "C:\My Data\TEST.DAT"  Z1 Z2
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 04/27/2016
Last updated: 04/27/2016

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