Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mix mode input of a binary open file Question!
#1
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.

[Image: pizza-turkey.jpg]
Reply


Messages In This Thread
Mix mode input of a binary open file Question! - by doppler - 11-28-2024, 01:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  a question about OpenGL in QB64pe: TempodiBasic 11 1,862 11-22-2025, 05:47 PM
Last Post: TempodiBasic
  How do you boot Win 11 in Safe Mode? Pete 8 5,957 10-30-2025, 06:03 AM
Last Post: SMcNeill
  Download the file from the internet and extract the .zip file quickbasic 6 684 10-25-2025, 01:39 AM
Last Post: madscijr
  Question about load pictures Jim_001 4 554 10-22-2025, 06:19 AM
Last Post: Unseen Machine
  Test to post a new Thread + question 32 or 64 bit Rudy M 2 556 09-09-2025, 04:10 PM
Last Post: Rudy M

Forum Jump:


Users browsing this thread: 1 Guest(s)