DTRHELP.HLB  —  Commands Statements Clauses, DECLARE SYNONYM Command
       Defines a synonym for a DEC DATATRIEVE keyword.

       Format

         DECLARE SYNONYM  { synonym  [FOR]  keyword }  [,...]

1  –  Arguments

    synonym

       Is the name of the synonym being defined. The name must conform
       to the rules for names listed in the DEC DATATRIEVE User's Guide.

    FOR

       Is an optional word to clarify syntax.

    keyword

       Is the name of a DEC DATATRIEVE keyword for which a synonym is
       being defined.

2  –  Examples

       Define synonyms for the keywords FIND and PRINT. Use the synonyms
       to form a collection of the first two yachts, and then print the
       collection.

       DTR> READY YACHTS
       DTR> DECLARE SYNONYM FD FOR FIND, PT FOR PRINT
       DTR> FD FIRST 2 YACHTS; PT CURRENT

                                      LENGTH
                                       OVER
       MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

        ALBERG      37 MK II   KETCH   37    20,000  12  $36,951
        ALBIN       79         SLOOP   26     4,200  10  $17,900

       DTR>

       Calculate the price per foot and per pound for the first five
       yachts. To save typing, define synonyms for COMPUTED, EDIT_
       STRING, and PRINT.

       DTR> SET NO PROMPT
       DTR> DECLARE SYNONYM CD FOR COMPUTED
       CON>     E_S FOR EDIT_STRING, PT FOR PRINT
       DTR> DECLARE PER_FT CD BY (PRICE/LOA) E_S $$$$.99.
       DTR> DECLARE PER_LB CD BY (PRICE/DISP) E_S $$.99.
       DTR> FOR FIRST 5 YACHTS
       CON>     PT TYPE, PRICE, PER_FT, PER_LB

                                          PER     PER
       MANUFACTURER   MODEL     PRICE     FT      LB

        ALBERG      37 MK II   $36,951   $998.68  $1.85
        ALBIN       79         $17,900   $688.46  $4.26
        ALBIN       BALLAD     $27,500   $916.67  $3.78
        ALBIN       VEGA       $18,600   $688.89  $3.67
        AMERICAN    26          $9,895   $380.58  $2.47

       DTR>
Close Help