*****************************************
      * Program name: display.cbl
      * This web-based program provides examples of 
      * DISPLAY and DISPLAYLF usage.
      *
      * Copyright 2000 Deskware, Inc.
      *****************************************
      *                                                               
      *                                                              
      * Syntax Form 1:   DISPLAY .                          
      *                                                               
      * Syntax Form 2:   DISPLAY     &                      
      *                              &                      
      *                              :         &                      
      *                          .                          
      * Syntax Form 3:   DISPLAY .                        
      *                                                               
      * Syntax Form 4:   DISPLAY .
      *

       1 variables.
          5 var1             PIC X(10).
          5 var2             PIC X(10).
          5 var3             PIC X(10).
        
       main.
            DISPLAY `This program demonstrates DISPLAY and DISPLAYLF`.
            MOVE `one`   TO var1.
            MOVE `two`   TO var2.
            MOVE `three` TO var3.

            DISPLAY var1.

            DISPLAY var1  &
                    var2  &
                    var3.


            DISPLAY `one       ` & 1 + 1 & `         ` & (pi(0)-0.14159).


            DISPLAY  var1 &
                     var2(1:fact(3) - 3) &
                     `       ` &
                     var3(0.5+0.5:floor(pi(0)-0.14159)+2).

            DISPLAYLF var1.

            DISPLAYLF var1  &
                      var2  &
                      var3.

            DISPLAY variables.

            DISPLAYLF variables.
            GOBACK.