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

Neither French, nor English?

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

Weather / Spam / www

Lyon Weather

aldweb against spam

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

Webmaster - Infos
Friends News


   visitors online

What do you think of the new design of the aldweb Site?
Great !
So ugly...
forum.gifForum - iziBasic - Topic #1253

Forum - Forum
iziBasic - iziBasic

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

active  Topic # 1253  Newbie REDUX

05/09/2005 @ 21:13
by 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.

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


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


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° 3
05/09/2005 @ 22:48
by 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.

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

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 ^