aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1087

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1087  Strange results with messagebox and POSE

06/02/2005 @ 19:40
by Larry

Anonymous



The below, when the message box appears, shows the last filename twice after the messagebox text? Is there is a chr$­­(0) or something I need to add?

'mr01.ibas
{creator id "mr01"}
dim a$­­(100)
begin
c=1
e=0
a$­­(c)=findfirst$­­("","")
c=c+1
l=9
while l>1
b$­­=findnext$­­("","")
l=len(b$­­)
if l>1 then
a$­­(c)=b$­­
print b$­­
c=c+1
end if
wend
e=messagebox("Thanks for using files...",0)
end
  Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
11/02/2005 @ 15:44
by aldweb

Anonymous

visitor
Hello Larry,

At this stage, but I will need to test your program, I see two possibilities:

1. Either there is a bug in the console, that displays the last line twice because it does not correctly do the last line feed. Try to add this between your wend and e=messagebox() lines:
c$­­=chr$­­(10)
print c$­­

2. Or the last filename should really be displayed twice. Indeed you use findfirst and findnext with blank parameters. Then, some files may exist twice in your system (like the empty skeletton of standard applications databases in ROM and the really used file in RAM) and it is normal that they are reported twice.

Cheers

@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
12/02/2005 @ 14:48
by Larry

Anonymous

visitor
The two filesnames show up in the message box, not on the console screen. At the end of my actual message box message.

I also sent another program to you (EMAIL) that hangs the emulator.

Thanks
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
12/02/2005 @ 15:39
by aldweb

Anonymous

visitor
Larry,

I tried your piece of code and I indeed get the same error.
So, you are right. I can already guess where the bug lies.
I will investigate.

As for the other program you sent me, I am going to give a look to it right now.

Cheers

@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
15/02/2005 @ 23:35
by aldweb

Anonymous

visitor
Larry,

I studied with a little bit more attention your source code and there is no iziBasic bug, but I could find 2 little mistakes in your source code

You dim a$­­(100), so reserving 100 minus 26 spaces for a$­­().

1st mistake:
Then, you initialize c=1, and increment it each time after you put a new value in a$­­(c).
=> a$­­(1) to a$­­(27) are also a$­­ to z$­­ (see iziBasic's user manual, arrays chapter).
=> as you use b$­­ afterwards in your source code, the a$­­(2) cell which should hold the filename of the 2nd file found will always be wrong.

2nd mistake:
As c increases, at one point it will get over 100 because there are more than 100 files in a common device, so it starts writing in the memory heap.
=> And one value will be written in the text heap that is needed by the MESSAGEBOX function.
=> This is why you get this unexpected display result in your MESSAGEBOX.

Cheers

@+
aldweb
Write to aldweb   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^