Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 
Table of contents Previous: String Tables - Listing, Creating and Using Strings Next: String Tables - Saving Strings and String Tables

10.2 String Tables - Editing Strings

In this exercise, you will use the ASK1 command to edit a string from the previous exercise and to prompt the user to create new strings.

  1. List strings in the string table.

    Type: TL

    You should see five user-defined strings (CT,KEYF4,NOTE,T,WORLDMAP) and two system strings (H,Y) as shown below.

    TL                                                                          
    CT          := ZA "#H                                                       
    H           := 20:42:30                                                     
    KEYF4       := ZA "USA   
    NOTE        := MAP OF THE WORLD                                             
    T           := ZA "20:12:07                                                 
    WORLDMAP    := MAP WORL 3 BOX=NO                                            
    Y           := 1999362                                                      
      --END OF LIST                                                             
    

    TL without any parameters lists the first 20 strings in the table that start with a number or a letter.

  2. Change the NOTE string to read "MAP OF THE ENTIRE WORLD!"

    Type: ASK1 NOTE
      In the pop-up window, edit the text to read "MAP OF THE ENTIRE WORLD!"

  3. Check that the NOTE string was changed.

    Type: TL NOTE

  4. Prompt the user to input a state and a four-digit METAR station.

    Type: ASK1 STATE 'Input a 2-character state' STATION 'and a 4 digit METAR station'

    In the pop-up window, enter a two-character state (e.g. TX) and a four-digit station (e.g. KLAR).

  5. Check that the STATE and STATION strings were added to the string table.

    Type: TL STA

    You should see the STATE and STATION strings listed.

    STATE       := TX               
    STATION     := KLAR            
    


Table of contents Previous: String Tables - Listing, Creating and Using Strings Next: String Tables - Saving Strings and String Tables

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690