Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 18/01/2005 @ 23:35 par aldweb
visiteur |
Hello Chuck,
So, let me try to give you some hints.
The best way for you, I guess, would be to use the MegaString to store your records. MegaString was introduced in version 4.0 of iziBasic more or less having the T5 and Treo 650 in mind
Then, you may save your data in it, using a field separator character of your liking (or fixed size fields, it is up to you) and you may even define the format for your numbers as you want, with all the available functions in iziBasic (to convert from number to string). Of course, reading back a record will require a small routine to parse the MegaString. This is the best way to limit the side effect of the Treo 650 and T5.
Before using the MegaString, which is 4KB big, you may train yourself with a standard string variable, but your record will have to be no more than 62 (or 63, I never remember!) characters long. But, 62 characters will be completed to 512 characters by your device... So, really better use the MegaString if a record can, by any chance, be bigger than 62 characters.
Here is a small and dummy source code that will write 10 lines filled with 10 numbers (1 to 10!) formated "x.xx" in a Memo, using the MegaString. CHR$(10) could be considered as a field separator character even though it is a real line feed in the Memo Pad application.
{SECUREFILES OFF} BEGIN J=1 FOR I=1 TO 10 A$=STR$(I,2)+CHR$(10) PUTSTRING$$ A$,J J=J+LEN(A$) NEXT I OPEN "MemoDB" FOR APPEND AS #1 PRINT$$ #1 CLOSE #1 END
I hope my first explanations will help you. Otherwise, just ask for more
Cheers
@+ aldweb |