VMS Help  —  INQUIRE  Examples
    1.$ INQUIRE CHECK "Enter Y[ES] to continue"
      $ IF .NOT. CHECK THEN EXIT

      The INQUIRE command displays the following prompting message at
      the terminal:

        Enter Y[ES] to continue:

      The INQUIRE command prompts for a value, which is assigned
      to the symbol CHECK. The IF command tests the value assigned
      to the symbol CHECK. If the value assigned to CHECK is true
      (that is, an odd numeric value, a character string that begins
      with a T, t, Y, or y, or an odd numeric character string), the
      procedure continues executing.

      If the value assigned to CHECK is false (that is, an even
      numeric value, a character string that begins with any letter
      except T, t, Y, or y, or an even numeric character string), the
      procedure exits.

    2.$ INQUIRE COUNT
      $ IF COUNT .GT. 10 THEN GOTO SKIP
        .
        .
        .
      $ SKIP:

      The INQUIRE command prompts for a count with the following
      message:

        COUNT:

      Then the command procedure uses the value of the symbol COUNT
      to determine whether to execute the next sequence of commands
      or to transfer control to the line labeled SKIP.

    3.$ IF P1 .EQS. "" THEN INQUIRE P1 "FILE NAME"
      $ FORTRAN 'P1'

      The IF command checks whether a parameter was passed to the
      command procedure by checking if the symbol P1 is null; if
      it is, it means that no parameter was specified, and the
      INQUIRE command is issued to prompt for the parameter. If P1
      was specified, the INQUIRE command is not executed, and the
      Fortran command compiles the name of the file specified as a
      parameter.
Close Help