November 14, 2007, 05:03 AM
SujiWebfocus Code behavior
Hi,
Is webfocus checks the code line by line or takes the whole code and compiles it
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-SRLSuji,
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.
November 14, 2007, 09:12 AM
LeahIn 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.