Has parseutil.inc changed?

Started by Nicola, February 06, 2026, 01:47:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nicola

Hi Charles, 
I had this little file-reading program that uses parseutil.inc. It used to give me the values correctly, but now it doesn't. Has something changed? 
Could you please help me?

uses parseutil
new Textarray t
t.load "dati.txt"
print t.line 7
string a=t.line 7
print t.lineCount
del t

wait

Charles Pegge

#1
Hi Nicola,

I've checked line read and write. It looks okay.

'06/02/2026
uses parseutil
uses console
Textarray t
t.load "t.txt"
int i
t.line(2)="ok"
for i=1 to 20
  string a=t.line i
  print i tab a cr
next
print cr cr t.lineCount
wait
del t

PS: found problem with 64bit ! I'm checking ...

Nicola

Something is wrong... 
I tried my sample and yours... yours (photo 1) is fine, mine isn't (photo 2). 
I can't figure out why.

The number of lines doesn't seem real to me either

'06/02/2026 - charles
uses parseutil
uses console
Textarray t
t.load "dati.txt"
int i
t.line(2)="ok"
for i=1 to 20
  string a=t.line i
  print i tab a cr
next
print cr cr t.lineCount
wait
del t

'nico
uses parseutil
uses console
print "prova Nicola"
textarray t
t.load "dati.txt"
string a=t.line 2
print a
a=t.line 7
print cr cr t.lineCount
print "finito"
wait

del t



Nicola

Hi Charles, have you done any checks?
I can't understand why this happens.
Cheers

Charles Pegge

Hi Nicola,

I think I've fixed the problem. Could you try this attached version of inc/stringutil.inc

Nicola

So, I did various tests with very strange results. Then I copied your little program into another oxide window and strangely it gave me anomalous results. I saved this second file with a different name, tried it and it was fine. So I tried to do the same thing with my little program: this time it worked well. I did other similar tests... in the end I realized that making some changes and starting with F5 didn't give the desired results. So, I saved the file with SAVE (ctrl-s), and started with F5 and the results were correct... I did other tests and every time I didn't save first with ctrl-s the results were not the ones I wanted... 

An oxide problem or do I need to save before starting the program every time?