This keyword data block is used to define a Basic program that prints user-defined quantities to the output file. Any Basic “PRINT” statement will write to the output file.
Line 0: USER_PRINT
Line 1: -start
Basic: 10 REM convert to ppm
Basic: 20 PRINT "Sodium: ", MOL("Na+")* 22.99 * 1000
Basic: 30 PRINT "Magnesium: ", MOL("Mg+2")* 24.3 * 1000
Basic: 40 pairs = MOL("NaCO3-") + MOL("MgCO3")
Basic: 50 PRINT "Pairs (mol/kgw): ", pairs
Basic: 60 REM print reaction increment
Basic: 70 PRINT "Rxn incr: ", RXN
Line 2: -end
USER_PRINT is the keyword for the data block. No other data are input on the keyword line.
-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 statements are evaluated in the order of the line numbers. Statements and functions that are available through the Basic interpreter are listed in The Basic Interpreter, tables 7 and 8.
-end --Indicates the end of the Basic program. Optional. Note the hyphen is required to avoid a conflict with the keyword END .
USER_PRINT allows the user to write Basic programs to make calculations and print selected results as the program is running. Results of PRINT Basic statements are written directly to the output file after each calculation. More information on the Basic interpreter is available in the section The Basic Interpreter. All of the functions defined in The Basic Interpreter, tables 7 and 8, are available in USER_PRINT Basic programs. Writing results of USER_PRINT can be enabled or suspended with the -user_print identifier in the PRINT data block. The USER_PUNCH data block is similar to USER_PRINT , except that PUNCH Basic statements are used to write results to the selected-output file.
PRINT, RATES, SELECTED_OUTPUT, and USER_PUNCH.