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 #1301

Forum - Forum
iziBasic - iziBasic


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

active  Topic # 1301  Izibasic and file write - binary numbers

26/11/2005 @ 23:50
by John_R

Anonymous



Wondering if there is a way to store numbers in a different format than string exponational (sp) format?

Or if its planned for a future versio?

Write to John_R   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
--------
27/11/2005 @ 12:11
by aldweb

Anonymous

visitor
Sure there are ways to do it. String exponantial format is the one used by iziBasic for its purposes, but you are not obliged to stick to it.

The principle will then be to convert to the format you want in a string variable or in the MegaString (very adapted for byte purposes) and save this string variable or the MegaString. Then, to load back, read a string variable, and convert back if needed.
Sorry, I don't feel I am very clear in my explanations...

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
--------
27/11/2005 @ 23:23
by John_R

Anonymous

visitor
You are most clear :)

Thanks


I am so use to higher level language (Like Basic), that i do not understand why one can not save a number in binary. With out the conversion process.

Just curious.

John_R

  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
--------
28/11/2005 @ 11:54
by aldweb

Anonymous

visitor
Hello John,

It was a decision, when I started iziBasic, to have it work with numbers in an easy way for users, so they would not have to bother if they are bytes, integers, long integers, reals...

So all numbers are single precision reals in iziBasic and iziBasic manages to work with these numbers in a transparent way.

If a number is an integer it is written in an integer format, encapsulated in a string. If it is a real number, it is saved in this exponential format, still put in a string.

Then, using iziBasic's read & write statements and functions, you may easily write a number and read it in a string variable, write a number in a string and read it in a number variable.

This is I believe very much in the "spirit" of the original Basic language.

I hope I answered your curiosity

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 ^