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

Ni Français, ni Anglais ?

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

Météo / Spam / www

Météo Lyon

aldweb contre le SPAM

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

Webmaster - Infos
News Amis


   visiteurs en ligne

Comment trouve-tu le nouvel habillage de l'aldweb Site ?
Superbe !
forum.gifForum - iziBasic - Sujet n°1253

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° 1253  Newbie REDUX

le 05/09/2005 @ 21:13
par Shawn


Okay, I've restarted this topic, just so it's easier to read.

I copied code from the examples out of the forum and I get syntax errors. My frustration with learning IZ is that there is no "code examples” I understand that you have put a lot of time and effort in to this program, and it truly shows. The manual is pretty good, and shows that a lot of work went into it as well. The only thing is that it shows syntax and not examples. I know maybe I'm asking a lot, and that's why I turned to the forum for examples and help. I know it's frustrating when someone will ask the forum a question that is clearly in the manual. Just keep in mind that some of us need a little more direction than the manual gives. I have printed the 103 paged manual and refer to it often. Alright enough said.

Here is my code, I STILL get a syntax error on the STR$­­(c$­­,0) line. I added the ,0 after your last posting and still no go.


TEXTFIELD #1,"0",0,15,25,50,10
TEXTFIELD #2,"0",0,15,45,50,10
BUTTON #3,"calculate",5,85,50,14
IF E=3 GOSUB _CalcIt : E=-1

Thanks again for all your hard work and time you have put into this pgrogram for all of us to enjoy.

  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 05/09/2005 @ 21:51
par aldweb


Hello Shawn,

It is a good idea to start a new topic, thanks.

Indeed the iziBasic implementation of STR$­­­() is not very standard. I did it on purpose to ease the output formatting of numbers to a text string. So there was a trick anyway!
And I have to acknowledge that my former answer was too fast, not very friendly. I wrote it very quickly, without thinking too much about it. I apologize for that.

I also understand your frustration because of the lack of "code examples". Please allow me to just say that iziBasic is a hobby project for me, not my job, and it is a "one man" project. So putting code examples for all single statements and functions is too much work for me.
This is why I took the option of providing so many full source code sample programs instead.

Now, the exact syntax of STR$­­­ is :
Indeed, you want to convert a numeral value into a string with a given format.
So, replace your C$­­­=STR$­­­(C$­­­,0) line by this one: C$­­­=STR$­­­(C,0).
You may also enhance a little bit your application by replacing the C=A/B line by this one: C=AB since the 0 format you used in the STR$­­­() function says that you want to display only the integer part of the number. So, an integer division would work just as fine and save you a few processor ticks.

Never hesitate to ask for more help.
This forum is the right place indeed to ask for help and to share good ideas and good pieces of source code.

Thank you for your last sentence. This is the best reward I can get for this first compiler project I ever worked on, as a hobby, for the fun of it.


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 05/09/2005 @ 21:57
par aldweb


Sorry, I missed another mistake in your source code when reading it.

MESSAGEBOX is also a function, so, in iziBasic, it is a must to put its return value in a variable, even a fake one that you don't use afterwards.

So, also replace MESSAGEBOX(C$­­,0) by somethink like: M=MESSAGEBOX(C$­­,0)


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° 3
le 05/09/2005 @ 22:48
par Shawn


Wow thanks for the quick response, and again thanks for your help and efforts.

I made the changes and all works. But this "app" was more of a learning curve.

Now, if you have time....

Why can't I use NUMFIELD instead of TEXTFIELD to get the numbers from the user?

The applications I want to create all deal with math equations and having to convert text to number and back again, is alot of effort if numfield would work.

thanks again.

  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 06/09/2005 @ 11:13
par aldweb


Hello Shawn,

When I replace the TEXTFIELD lines by NUMFIELD in your sample source code, everything works fine.
So, maybe provide a few more explanations of what does not work for you...

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 ^