Previous: , Up: Complete programs   [Contents][Index]


Top-level statements and log files

Top-level statements and log files

The reason that coNCePTuaL distinguishes between <top_level_complex_stmt>s and <complex_stmt>s is that <top_level_complex_stmt>s begin a new table in the log file (see Writing to a log file) while <complex_stmt>s add columns to the current table. Consider the following piece of code:

TASK 0 LOGS 111 AS "First" AND
            222 AS "Second".

Because ‘First’ and ‘Second’ are logged within the same <simple_stmt> they appear in the log file within the same table but as separate columns:

"First","Second"
"(all data)","(all data)"
111,222

The same rule holds when LOGS is used repeatedly across <simple_stmt>s but within the same <complex_stmt>:

TASK 0 LOGS 111 AS "First" THEN
TASK 0 LOGS 222 AS "Second".

However, if ‘First’ and ‘Second’ are logged from separate <top_level_complex_stmt>s, the coNCePTuaL run-time library stores them in separate tables:

TASK 0 LOGS 111 AS "First".
TASK 0 LOGS 222 AS "Second".
"First"
"(all data)"
111

"Second"
"(all data)"
222
Scott Pakin, pakin@lanl.gov