Interactive PowerBasic Forum

IT-Consultant: Charles Pegge => OxygenBasic Examples => Topic started by: Nicola on February 06, 2026, 01:47:05 PM

Title: Has parseutil.inc changed?
Post by: Nicola on February 06, 2026, 01:47:05 PM
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
Title: Re: Has parseutil.inc changed?
Post by: Charles Pegge on February 06, 2026, 07:08:01 PM
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 ...
Title: Re: Has parseutil.inc changed?
Post by: Nicola on February 06, 2026, 07:48:09 PM
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

Title: Re: Has parseutil.inc changed?
Post by: Nicola on February 06, 2026, 07:50:50 PM
I am testing it on a 64-bit system  :-[
Title: Re: Has parseutil.inc changed?
Post by: Nicola on February 08, 2026, 11:30:51 AM
Hi Charles, have you done any checks?
I can't understand why this happens.
Cheers
Title: Re: Has parseutil.inc changed?
Post by: Charles Pegge on February 08, 2026, 02:23:53 PM
Hi Nicola,

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