How does PureBasic parse files?
Posted: Wed May 27, 2015 5:10 pm
Given a file like this:
"abcd","abcdsssss"
"aaaaaaaabbs","ffffffffffffffff"
.......
1.098 2.754 3.777 5.777
1.999 3.777 4.567
2.888 4.675
1.897
This file is divided into two main parts:
The first part includes two sections separated by comma, these two sections can be any length within double quotes. I want to put the first section into an array and put the second into another array. I figured out how to do that but using pretty long codes. Could anyone possibly give some guidelines about how to get the output in several shorter lines?
The second part of the file is filled with numeric values with specific length and separated by space and every following line is shorter than by one value. I need to put these values into a matrix. I have no idea how PureBasic parses files as other languages do, like how to recognize delimiter and so on.
Could someone help me with this or recommend some links or sources about how PB parses files?
Thanks.
"abcd","abcdsssss"
"aaaaaaaabbs","ffffffffffffffff"
.......
1.098 2.754 3.777 5.777
1.999 3.777 4.567
2.888 4.675
1.897
This file is divided into two main parts:
The first part includes two sections separated by comma, these two sections can be any length within double quotes. I want to put the first section into an array and put the second into another array. I figured out how to do that but using pretty long codes. Could anyone possibly give some guidelines about how to get the output in several shorter lines?
The second part of the file is filled with numeric values with specific length and separated by space and every following line is shorter than by one value. I need to put these values into a matrix. I have no idea how PureBasic parses files as other languages do, like how to recognize delimiter and so on.
Could someone help me with this or recommend some links or sources about how PB parses files?
Thanks.