aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1087

Forum - Forum
iziBasic - iziBasic


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

actif  Sujet n° 1087  Strange results with messagebox and POSE

le 06/02/2005 @ 19:40
par Larry

Anonyme



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
  Poster une réponse  Haut

[]   


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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

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

Anonyme

visiteur
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
  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^