Focal Point
Webfocus Code behavior

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4041081752

November 14, 2007, 05:03 AM
Suji
Webfocus Code behavior
Hi,
Is webfocus checks the code line by line or takes the whole code and compiles it


WebFOCUS 7.7.02(Production)
WebFOCUS 7.7.02(Test region)
Oracle backend (10g)and Windows Frontend.
HTML,PDF,EXL2K,FLEX,AHTML
November 14, 2007, 07:08 AM
<ludo>
I think WF compile and execute all the code before -RUN so if you put several -RUN in your code each time there's a -RUN the stack is emptied and the code executed. If you don't put a -RUN I presume that WF compile and run the entire fex in one time.

Hope I'm right and it helps you
Ludo
November 14, 2007, 07:32 AM
Danny-SRL
Suji,
This is the most important thing to understand when writing FOCUS code:
When you run a FOCUS program, the program is loaded. FOCUS then reads each line. Those lines starting with a '-' sign - Dialog Manager commands - are executed immediately. The others are sent to the FOCSTACK. When FOCUS encounters one of the 3, end of program, -EXIT or -RUN, control is given to the command processor who reads from the FOCSTACK, check, interprets and executes. There is no real compilation.
When a -RUN is encountered, the FOCSTACK is executed and then control returns to the FOCEXEC at the line following the -RUN.

I hope this clarifies your understanding.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

November 14, 2007, 09:12 AM
Leah
In the mainframe lingo, FOCUS code is interpreted not compiled. One disadvantage of that is that sometimes you fix an error and then the next one shows up. The one thing I don't like about the language.


Leah