I hope I'm offending anyone but, this code:
[code]FH1=OpenFile(FP$):FH2=WriteFile(FQ$)
While Not Eof(FH1)
BT=ReadByte(FH1)
Repeat
AW$=AW$+Chr$(BT):BT=ReadByte(FH1)
Until BT=32
WriteLine(FH2,AW$):AW$="":NW=NW+1
Wend
Print NW+" WRITTEN"[/code]
reads a file a byte at a time. When a space separator is found it then writes the word to another file.
About or near the 100,000th word, the program then freezes.
I know some of you will write that I'm on the forum however some of you are familiar with this.
Program freezes
Re: Program freezes
About which programming language are you speaking? Maybe it's better you post your question in a forum of your programming language. Use next time correct tags for your posts.
P.S.: Please can any mod move this topic to 'OffTopic'
P.S.: Please can any mod move this topic to 'OffTopic'
sorry for my bad english
Re: Program freezes
If your file does not ends with a space ...
You need an additional eof()
You need an additional eof()
Program freezes
Thanks
That was it infratec.
The program was also reading past the end of file returning zeros.
That was it infratec.
The program was also reading past the end of file returning zeros.
Re: Program freezes
That (mis)phrase has made my daydna wrote:I hope I'm offending anyone

Proud supporter of PB! * Musician * C64/6502 Freak
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: Program freezes
You know, I read that phrase 3 times and didn't 'see' it till you mentioned it? Must be getting old.oreopa wrote:That (mis)phrase has made my daydna wrote:I hope I'm offending anyone
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: Program freezes
I read the source code several times without realising it's not even PureBasic, and I wondered why Josh was asking what language it was.Fangbeast wrote:You know, I read that phrase 3 times and didn't 'see' it till you mentioned it? Must be getting old.
