A Look Back 30+ Years “Forms”

I first saw forms technology at Digital Equipment Corporation in 1985. When we were all learning and or programming with “structured” languages, PL/I, Pascal, and maybe kind-of C, told by Professor Dijkstra that goto statements were harmful to us, and some Pascal devotees were claiming the break and continue statements were bad, there was forms coding.

So, when you see me mention forms or 4GL, you’ll have a better idea of what is going on, just in case you have not had the fun of programming with forms. By the way, I’m talking about forms technology, not so much 4GL, which is a very good database reporting language.

Here is a simple form that looks like this when displayed:

And here is the source code for the form:

database ics
screen
{
    TOWN OF <YOUR-TOWN> BOARD OF ASSESSORS
    "SELDRIVER" LABELS

    Please enter "s" or "r" to indicate whether or not you want to 
    process a single or several labels "s" or a range of addresses
    on one street, road, or avenue "r".

    Single Address or Range on Street (s/r): [r]

    Press ESC to Exit program.
}
end
tables
real_estate
attributes
r = formonly.s_r type char;
end

And here is the first loop that processes the form. 
There are two more forms after this. This is just the main form.


  let cont_outer_loop = 1

  while 1 = cont_outer_loop
    open window re1 at 8,1 with form "seldriver"
           attribute(message line last,comment line first)

        # As long as the user has not pressed escape, keep grabbing.
        message "Enter s or r or press ESC to exit."
        input by name s_r

        on key (ESC)
            prompt "Do you want to print more labels? (y/n): " for ans
            if "n" = ans then
                let cont_outer_loop = 0
                exit input
                continue while
            end if

        after field s_r
            if "s" != s_r and "r" != s_r then
                error "Enter s or r or press ESC to exit"
                next field s_r
            end if

        exit input
        end input
        close window re1
        .
        .
        .
        Dispatching to correct form
  end while




Forms technology encourages spaghetti code, and even if you configured your form to run as
the widest non-graphical monitor setting, you do not have as much scaling freedom 
as you do on an X, MAC, or Windows system.

So, there is my input today on forms technology.
Advertisements

Leave a comment

Filed under Programming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s