-
I have a short question - what's the code to find the number of rows and columns in a text file? Say I have something like this:
2,7,3
4,5,2
I want to assign some variable with the number 3 and another with 2. If yer wondering why, I need this fer my tiling. :)
-
just bringin this back up to the top cuz no one answered it yet!!!!! >:O
-
Once again, I'm bringing my question back to the top, still waiting for an answer ;)
-
Short of opening it in Binary mode and parsing it, there's not really much of a way of doing that. If you need to know, you can store the width and height at the start of the file.
[code]
3,5
5,10, 4
20,40,23
45,11, 6
2,10, 4
9, 9, 9
[code
For example.
Of course, binary mode is better suited for a file like that, but ...