Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I am writing a program that needs to read a text file such as the following,
[Region]
0=Japan,0000C2,0
1=USA,0000C2,2
2=Hispanic,0000C2,4
3=Asia,0000C2,6
4=Euro,0000C2,8
[0]
Name=P1 Max Exp
0=OFF,0,0
1=ON,FF86EE,99,FF86EF,9,FF86F0,99,FF86F1,99
[1]
Name=P1 Inf. SP
0=OFF,0,0
1=ON,FF86F2,9,FF86F4,99,FF86F5,99
If we look at the bottom section I would like to read the "1","P1 Inf. SP","Off","0","0","ON","FF86F2","9","FF86F4","99","FF86F5","99" into different strings. What is the easiest way to do this given that the length of all these strings can vary - they will always be seperated by a comma.
Also, is it possible to convert a string into a PChar that can be used with ptr() and the ^.
Thanks for any help,
Barry
I am writing a program that needs to read a text file such as the following,
[Region]
0=Japan,0000C2,0
1=USA,0000C2,2
2=Hispanic,0000C2,4
3=Asia,0000C2,6
4=Euro,0000C2,8
[0]
Name=P1 Max Exp
0=OFF,0,0
1=ON,FF86EE,99,FF86EF,9,FF86F0,99,FF86F1,99
[1]
Name=P1 Inf. SP
0=OFF,0,0
1=ON,FF86F2,9,FF86F4,99,FF86F5,99
If we look at the bottom section I would like to read the "1","P1 Inf. SP","Off","0","0","ON","FF86F2","9","FF86F4","99","FF86F5","99" into different strings. What is the easiest way to do this given that the length of all these strings can vary - they will always be seperated by a comma.
Also, is it possible to convert a string into a PChar that can be used with ptr() and the ^.
Thanks for any help,
Barry