| Next|| Previous || Top |

USER_PUNCH

This keyword data block is used to define Basic programs that print user-defined quantities to the selected-output file. Any Basic "PUNCH" statement will write to the selected-output file.

Example data block

Line 0: USER_PUNCH
Line 1:      -headings Na+ Mg+2 Pairs Rxn_increment 
Line 2:      -start
Basic:  10 REM convert to ppm
Basic:  20 PUNCH MOL("Na+")* 22.99 * 1000 
Basic:  30 PUNCH MOL("Mg+2")* 24.3 * 1000 
Basic:  40 pairs = MOL("NaCO3-") + MOL("MgCO3") 
Basic:  50 PUNCH pairs
Basic:  60 REM punch reaction increment
Basic:  70 PUNCH RXN
Line 3:      -end

Explanation

Line 0: USER_PUNCH

USER_PUNCH is the keyword for the data block. No other data are input on the keyword line.

Line 1: -headings list of column headings

-headings--Headings will appear on the first line of the selected-output file. Optionally, heading, headings, or -h[ eadings].

list of column headings --White-space-delimited (any combination of spaces and tabs) list of column headings.

Line 2: -start

-start--Indicates the start of the Basic program. Optional.

Basic: numbered Basic statement

numbered Basic statement --A valid Basic language statement that must be numbered. The program should contain at least one "PUNCH" statement. The statements are evaluated in numerical order. Statements and functions that are available through the Basic interpreter are listed in tables 8 and 9.

Line 2: -end

-end--Indicates the end of the Basic program. Optional. Note the hyphen is required to avoid a conflict with the keyword END.

Notes

USER_PUNCH allows the user to write a Basic program to make calculations and print selected results to the selected-output file as the program is running. Results of PUNCH Basic statements are written directly to the selected-output file after each calculation. The Basic program is useful for writing results in the correct form, so that they can be plotted directly. All of the functions defined in tables 8 and 9 are available in USER_PRINT Basic programs. More information on the Basic interpreter is available in the description of the RATES keyword. USER_PUNCH has no effect unless a SELECTED_OUTPUT data block has been defined. Writing results of USER_PUNCH can be enabled or suspended with the -user_punch identifier in the SELECTED_OUTPUT data block. If the -selected_output identifier in the PRINT data block is false, then all selected output, including USER_PUNCH, is disabled.

Example problems

The keyword USER_PUNCH is used in example problems 6C, 9, 10, 11, 12, 13, 14, and 15.

Related keywords

PRINT, RATES, SELECTED_OUTPUT, and USER_PRINT.


| Next|| Previous || Top |