HELPLIB.HLB  —  Lexicals  F$ENVIRONMENT  Examples
    1.$ SAVE_MESSAGE = F$ENVIRONMENT("MESSAGE")
      $ SET MESSAGE/NOFACILITY/NOIDENTIFICATION
         .
         .
         .
      $ SET MESSAGE'SAVE_MESSAGE'

      This example uses the F$ENVIRONMENT function to save the
      current message setting before changing the setting. At the
      end of the command procedure, the original message setting is
      restored. The single quotation marks (` ')  surrounding the
      symbol SAVE_MESSAGE indicate that the value for the symbol
      should be substituted.

    2.$ MAX = F$ENVIRONMENT("MAX_DEPTH")
      $ SHOW SYMBOL MAX
        MAX = 32   Hex = 00000020  Octal = 00000000040

      This example uses the F$ENVIRONMENT function to determine the
      maximum depth allowable within command procedures.

    3.$ SAVE_PROT = F$ENVIRONMENT("PROTECTION")
      $ SET PROTECTION = (SYSTEM:RWED, OWNER:RWED, GROUP, WORLD)/DEFAULT
         .
         .
         .
      $ SET PROTECTION = ('SAVE_PROT')/DEFAULT

      This example uses the F$ENVIRONMENT function to save the
      current default protection before changing the protection.
      At the end of the command procedure, the original protection
      is restored. You must place single quotation marks around the
      symbol SAVE_PROT to request symbol substitution.
Close Help