Beginners > BASIC functions
Selective SI Values
(1/1)
davidblevy:
In a mixing scenario, is there a way to send all positive SI values for respective minerals to a selected output file?
thank you, David
dlparkhurst:
I'm not sure exactly what you want. It is difficult to get a set of headings, and if you are running multiple calculations, the set of positive saturation indices could vary among calculations. Here is a quick way to list positive saturation indices. The mineral is written to one column and the saturation index in the following column. There is no attempt to specify column headings, or keep minerals in specific columns.
--- Code: ---SOLUTION
pH 7 charge
Na 2
Ca 1
Mg 1
C 3
S(6) 1
SELECTED_OUTPUT 2
USER_PUNCH 2
10 t = SYS("phases", count , name$ , type$ , s_index )
20 for i = 1 to count
30 if s_index(i) < 0 then goto 50
40 PUNCH name$(i), s_index(i)
50 next i
END
--- End code ---
davidblevy:
This is what I was after, thanks David!
Navigation
[0] Message Index
Go to full version