11-28-2024, 01:06 PM
I get the strangest ideas now and then. By the experts here everyone might get ideas about my thought. - OR - I will be shot down in flames.
Normally I would use binary open to read in a text file. Much faster than "open" using input mode. My thoughts on the matter, I would like to use a mix mode of getting the data. I would normally open with binary mode start reading using "line input #1,d$". But switch to "input #1,n1,n2,n3,n4" at some point. Such as content of my file:
# Comments
# Comments
# Comments
# Comments
#
#eoc
1,2,3,4
5,6,7,8
9,10,11,12
999999,0,0,0
# more comments
# Comments
# Comments
# Comments
# Comments
#
#eoc
13,14,15,16
17,18,19,20
Note the line "#eoc". This would be my trigger point to switch to "input #1,n1,n2,n3,n4" to get the remaining data. An after thought at this point and I changed my file now as I am typing this out. If I can switch mix input modes. Can I go back to "line input" and again go back to "input" modes ? The other trigger point is the 999999 value in first position.
I can see this as a possibility since binary input has a pointer to the file opened. To where the next read of file takes place. The input request only specifics how much input happens and where to stop.
Thanks for any answers.
BTW, if you are a United States member. Why are you reading my comments. GO GET STUFFED!!!.
By Turkey.
Normally I would use binary open to read in a text file. Much faster than "open" using input mode. My thoughts on the matter, I would like to use a mix mode of getting the data. I would normally open with binary mode start reading using "line input #1,d$". But switch to "input #1,n1,n2,n3,n4" at some point. Such as content of my file:
# Comments
# Comments
# Comments
# Comments
#
#eoc
1,2,3,4
5,6,7,8
9,10,11,12
999999,0,0,0
# more comments
# Comments
# Comments
# Comments
# Comments
#
#eoc
13,14,15,16
17,18,19,20
Note the line "#eoc". This would be my trigger point to switch to "input #1,n1,n2,n3,n4" to get the remaining data. An after thought at this point and I changed my file now as I am typing this out. If I can switch mix input modes. Can I go back to "line input" and again go back to "input" modes ? The other trigger point is the 999999 value in first position.
I can see this as a possibility since binary input has a pointer to the file opened. To where the next read of file takes place. The input request only specifics how much input happens and where to stop.
Thanks for any answers.
BTW, if you are a United States member. Why are you reading my comments. GO GET STUFFED!!!.
By Turkey.