Download Informix 4GL By Example, Version 4.1

Transcript
Writing a Simple 4GL
Program
This example shows how to display a logo banner to identify a program
while the program is initializing. You can copy and adapt the 4GL code to
provide a logo banner for your own application.
This example also illustrates the fundamentals of 4GL in much the same way
that the classic hello, world program illustrates the C programming language.
4GL enhances the set of standard SQL database statements with screen interaction statements, flow control statements, and other statements that make it
easier to program a database application.
This example demonstrates the following display techniques:
•
•
•
•
Displaying a form.
Displaying information in a field on the form.
Displaying text at a row and column location.
Setting display attributes such as reverse video.
Example 1 also demonstrates the following 4GL programming techniques:
•
•
•
•
•
•
Defining a main function for the 4GL program.
Defining supporting functions.
Calling functions with parameters.
Defining variables.
Assigning values to variables.
Opening and closing forms.
Later examples will show you how to display database information and how
to collect information from the user.
Example 1
November 10, 1997 4:23 pm
33