sega |
March 31, 2010 06:50 |
Hello World.
I'm getting back to this. There are some questions surfacing.
fscanf() looks like the right approach when dealing with data in which every line looks the same.
My data is somehow "blocked".
One "set" contains 8 lines, each with different entries and lengths.
Exactly like this:
Code:
#1;FeS[s];#;#;#;#;#; ===>;Fe[s];0.5 S2[g];#;#;#;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
minflag;0;-1;-1;-1;-1;-1; ===>;0;0;-1;-1;-1;-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FACTSAGE[g]-no;1,00E+000;-1,00E+000;-1,00E+000;-1,00E+000;-1,00E+000;-1,00E+000; ===>;6,35E-001;3,65E-001;-1,00E+000;-1,00E+000;-1,00E+000;-1,00E+000;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
stoich;1,000E+00;0,000E+00;0,000E+00;0,000E+00;0,000E+00;0,000E+00; ===>;1,000E+00;5,000E-01;0,000E+00;0,000E+00;0,000E+00;0,000E+00;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
"on>=1;off=0";#;order;pol_type;C1;P1;C2;P2;C3;P3;C4;P4;C5;P5;C6;P6;C7;P7;C8;P8;C9;P9;C10;P10;A;T_min[grd.C];T_max[grd.C];pO_min;pO_max;dt_min;dt_max;Medium-0,1,2,3;DiamMIN[Micron];DiamMAX[micron];BetaT0[K/s];PO20[1bar];T0[K];Source;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0;R1;1,0;1;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,600E-04;1,000E+00;5,982E+02;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;0,000E+00;250,0;1100,0;0,000E+00;2,000E-01;1,000E+01;1,000E+02;3;0,000E+00;3,000E+02;1,000E+00;1,000E+00;1,000E+00;Bozic2003;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1;Fn;1,0;1;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,861E-04;1,000E+00;6,539E+02;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;1,000E+00;0,000E+00;0,000E+00;250,0;1100,0;0,000E+00;2,000E-01;1,000E+01;1,000E+02;3;0,000E+00;3,000E+02;1,000E+00;1,000E+00;1,000E+00;Bozic2003;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Looks like a big mess, huh?
I think I can't use the fscanf because each line is formatted differently.
What I need more is a procedure to go from one delimeter ( ; ) to the next and read the contents in between for individual lines (not for the whole file at first).
Any ideas?
|