|
|
|
|
|
HOW TO: DIY PROGRAMMING
Programming from Scratch GenRe may be used to build relatively complex application systems. This simple program demonstrates how easy it is for PC users to create programs from scratch. These are the step-by-step illustrations for (a) creating a program, (b) activating 3 fields, and (c) adding amounts of two fields into another field. Step 1: Go to a program menu. Click the [hammer]....
The designer panel is shown
below. Step 2: Select a program
slot that is free such as Program 4. Its details appear on
designer panel. Click [Create]...
Step 3: Select [Create data entry].
The screen templates are
displayed using the screen below. Step 4. Simply click [Use Default Screen]:
Step 5. Change the name of program into say Sample Program. Click [Close] to return to the menu:
Step 6: Click [Sample Program] to open the new program:
The program is shown below.
The icons on top left and the command buttons at the bottom are standard features. Only two screen objects are active - a label (default name
is Label1) and a field (default name is Field1). Step 7: Click the hammer to flip to design mode and to activate more fields:
The design mode is an image
of the program plus the designer panel. Step 8. To activate two more fields, select field2 from the list of IDs:
Field2 is selected. Step 9. To activate the field, check the [Show] button:
Field2 is displayed below
Field1. Step 10: Click the tab field
and assign 2 to Field2. At this point, you can use the other buttons to modify Field2, including its name, font, dimensions, and colors. For now, let us ignore them.
Step 11: Select Field3 from the list, click [Show] to activate it...
and assign tab number 3:
Next, change the types from
alphabet to number. Step 12: Click the type of Field3 and change it to number. Click Field1 so that its details appear on the panel and change its type to number. Do the same for Field2.
Close the designer and go
back to the program. It should look like this. A new program, screen and fields, created in a minute or two:
Next, create the programming
instructions that add Field1 and Field2 and move the total to Field3. You can place the
instructions behind the Create, Modify, Delete or Compute button. Since we are not concerned
with writing records at this time, let's use Compute. Usually, [Compute] carries
out calculations that you want before creating or updating records. Step 13: Click the hammer to
return to designer mode. Then click [Compute] so that its details appear on the panel.
This screen is used for adding special instructions:
Step 14: Select Field1
from list of operand1s. Select add to from list of operations. The formula at the bottom of the screen tells you how to complete the instruction.
Step 15: Select Field2
from operand2s and Field3 from operand3s. [Add] the instruction to the list.
Step 16: [Apply] the instruction:
Step 17: Close the designer to return to the program.
To test the program, enter amounts into Field1 and Field2...Enter 500 then press tab or [Enter] key, then enter 333 and press the tab or [Enter] key...
Then click [Compute]:
You have created the program - within minutes. In addition, you can always add more instructions, fields, change fonts, sizes, field dimensions and locations at any time. The program works right away without having to dot
the I's and cross the T's. There is clear distinction between essential
and trivial parts of programs. With traditional programming, often times
the major logic is written quickly but much of the time is spent fiddling
with non-essentials and cosmetics. Should you need more instructions, use the debugging mode to find out if the results are correct. Before clicking [Compute], click [Special] and select [Debug next command]:
Then click [Compute]. This time, the instruction, the fields and the amounts they held, are also printed in the order of execution. You know exactly what is happening at any point of program execution.
With traditional programming, debugging is a pain-staking task. GenRe Software has simplified this task for two reasons: 1.
About 90% of GenRe programs consist of so-called generic code (the
template). Problems with generics are fixed by GenRe Support. The tracer
numbers imbedded in the template facilitate identification of problems.
(The template may be likened to MS Excel program.) 2. The other 10% consist of program-specific codes (like Excel macros) that are entered by users. The debug mode verifies the specific code. Many programs do not even need specific code. Once created and tested, both specific and generic codes may be cloned into new and virtually bug-free programs. Traditional programming is a process of re-inventing the wheel, although using more and more sophisticated tools, carried out by experts. GenRe, on the other hand, is about reusing fully tested programs via DIY programming carried out by end users.
|
|
Back gsprog20100224 |