Please enable JavaScript to view this site.

A-Shell Reference

The advantage of using INFLD for displaying fields is that you can use one set of field parameters for both input and display, letting INFLD do the formatting work as well as adapting to the capabilities of the display environment. But rather than convert your PRINT FIELD’1 statements to INFLD, you might as well go one short step further and just use the same code that you use for editing the fields to display it. For example, if your program has separate routines for displaying and editing your data, e.g.:

DISPLAY'FIELDS:

PRINT TAB(8,10);FIELD1

PRINT TAB(9,10);FIELD2 USING "#####.##"

etc.

INPUT'FIELDS:

CALL INPUT'FIELD1

CALL INPUT'FIELD2

etc.

Assuming the INPUT’FIELDS routines use INFLD already, just make sure they use a common global variable for the OPCODE parameter (1=edit, 2=display), in which case you can reorganize it as follows:

DISPLAY'FIELDS:

OPCODE = INFOP_DISPLAY   ! display

CALL DO'FIELDS

RETURN

INPUT'FIELDS:

OPCODE = INFOP_PRELOAD   ! input

CALL DO'FIELDS

RETURN

DO'FIELDS:   ! caller sets OPCODE=1 for input, 2 for display

CALL FIELD1

CALL FIELD2

etc.

With INFLD doing the output, our screen now looks like this:

ashref_img81

Now we are getting pretty close, at least visually, but we still have the text INMEMO display of comments. To complete the visual makeover, we’ll change that to a multi-line edit control:

ashref_img82

At this point, the only obvious trace of text mode aesthetics visible is the use of numbers with the field labels. Aside from that, we still have some work to do on the operational side to implement the ability to click on any field.