DTRHELP.HLB  —  Commands Statements Clauses, DECLARE PROCEDURE Command
       Creates the temporary definition of a procedure.

       Format

         DECLARE PROCEDURE  procedure-name

               .
               .
               .

         END_PROCEDURE

1  –  Arguments

    procedure-name

       Is the name of the procedure you want to declare.
       It must be a simple name.

    END_PROCEDURE

       Ends the procedure definition.

2  –  Examples

       DTR> DECLARE PROCEDURE GRZ1
       DFN> PRINT "I am Alessandra's mother" ;
       DFN> :ALE1 ;
       DFN> END_PROCEDURE ;
       DTR>
       DTR> DECLARE PROCEDURE ALE1
       DFN> PRINT "I am Grazia's daughter" ;
       DFN> END_PROCEDURE ;
       DTR>
       DTR> :GRZ1

       I am Alessandra's mother
       I am Grazia's daughter

       The following example shows how to declare a procedure that
       displays a group of boats with a price less than a figure you
       supply when the procedure runs:

       DTR> DECLARE PROCEDURE PRICE_LIST
       DFN>         READY CDD$TOP.DTR$LIB.DEMO.YACHTS
       DFN>         PRINT SKIP, COL 20,
       DFN>         '*** Price List of YACHTS ***', SKIP ;
       DFN>         FOR FIRST 5 YACHTS WITH PRICE NE 0 AND
       DFN>                 PRICE LE *.'the ceiling price'
       DFN>                         PRINT BOAT
       DFN>         PRINT SKIP, COL 10, 'See anything interesting?'
       DFN> END_PROCEDURE ;
       DTR>
       DTR> :PRICE_LIST ;
                          *** Price List of YACHTS ***

       Enter the ceiling price: 4500

                                LENGTH
                                 OVER
       MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

        CAPE DORY   TYPHOON    SLOOP   19     1,900  06   $4,295
        VENTURE     21         SLOOP   21     1,500  07   $2,823
        VENTURE     222        SLOOP   22     2,000  07   $3,564
        WINDPOWER   IMPULSE    SLOOP   16       650  07   $3,500

                 See anything interesting?

       DTR>
Close Help