Examples of OUTPUTMESSAGE ARRAY Declarations

In the following example, the output message array ERRORS shows an OUTPUTMESSAGE ARRAY declaration with the same output messages in two languages. The language of the user and the output message number determine the output message that is selected from this array.

OUTPUTMESSAGE ARRAY ERRORS (
   ENGLISH (
      10 = "POSITIVE INTEGER EXPECTED.",
      20 = "TOO MANY PARAMETERS."
           ),
   FRANCAIS (
      10 = "DEMANDE UN ENTIER POSITIF.",
      20 = "TROP DE PARAMETRES."
           ));

In the following example, the output message array SUMMARY shows an OUTPUTMESSAGE ARRAY declaration with parameters. The first parameter value is not used as part of the message, but rather to select among case alternatives. The second and third parameters are conditionally inserted into the message, based on the value of the first parameter. Note that both the second and third parameters are not necessarily used. When the message is given in the language FRANCAIS, decimal points in the values of parameters 2 and 3 are changed to decimal commas.

OUTPUTMESSAGE ARRAY SUMMARY (
      ENGLISH (
         100 =
            "THIS PROGRAM IS TO BE EXECUTED WITH "
            CASE <1> OF
               BEGIN
               "1": "MAX PROCESSING TIME " <2> " SEC.",
               "2": "MAX I/O TIME " <3> " SEC.",
               "3": "MAX PROCESSING TIME " <2> " SEC., MAX "
                      "I/O TIME " <3> " SEC."
               END
             ),
       FRANCAIS (
         100 =
            "CE PROGRAMME DOIT S’EXECUTER EN MOINS DE "
            CASE <1> OF
               BEGIN
               "1": <2, DECIMALPOINTISCOMMA>
                      " SEC. DE CALCUL.",
               "2": <3, DECIMALPOINTISCOMMA> " SEC. D’E/S.",
               "3": <2, DECIMALPOINTISCOMMA>
                      " SEC. DE CALCUL OU "
                      <3, DECIMALPOINTISCOMMA> " SEC. D’E/S."
               END
               ));