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

Forum - Forum
iziBasic - iziBasic


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

active  Topic # 1121  HelpNeeded : Reading entire string ...

21/02/2005 @ 14:23
by Khertan

Anonymous



Hi again.

I ve some trouble to parse a TaskDB-Ptod database ... it s the new todo database on T5 ...

My trouble is that the record contain many chr(0) ... so when i get the string with :

input #1,B$­­
or input$­­$­­ #1

the megastring and the string don t have the entire record ... it s stop to the first occurence of a chr(0) ...

how to round around ?
Write to Khertan   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
--------
21/02/2005 @ 23:24
by aldweb

Anonymous

visitor
Hello Khertan,

I just checked my code and, indeed, both INPUT #1 and INPUT$­­$­­ #1 check for the first CHR$­­(0) and ignore all further possible characters.
This was made on purpose to avoid garbage characters like:
- remaining characters from a previous reading of the buffer
- or first characters of the piece of data stored after the current reading

Then, if I change this, I will have to clean the buffer each time, which is time consuming. And I will have no way to know where to stop reading, especially the MegaString so I will read all 4KB of data each time, not knowing how to separate the right one from the bad one.

I am just very surprised that Palm did this stupid thing of not using this so common habit of the CHR$­­(0) end of line code.
Then, they by force have to know somewhere the exact size of a record...
Sorry to say it, but this T5 device is really a "pain in the ass".

Let me think about a polite and clean way for you, my dear users, to work around this thing... because I am really confused right now!

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
--------
22/02/2005 @ 07:29
by Khertan

Anonymous

visitor
I don t know why palmsource do this stupid things ... But what i know now is that all new Database File for the new PIM Apps seems to use two separate data files, the new ones with chr(0) charactere, and the old with the old format.

For example : the Memo
The old Memo database : MemoDB
The new one : MemoDB-Ptod

same thing for the task there are two file ... the new one contain the new feature that the old one don t have ...

so i ll do without and parse the old file.

Thanks for your answer
Write to Khertan   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
--------
22/02/2005 @ 09:54
by Khertan

Anonymous

visitor
For the task it s ok ...

But for the agenda ... there are also two database ... but the two contain some chr(0) data ...

For the first data i ve in a record something like this :

08 00 17 00 CA 21 04

I think 08 00 is the start of the rendez vous ...
17 00 is the end ...

And CA 21 04 is about the date ... i don t know at this time how to convert to real date ... but CA 21 04 is the first january 2005. so i ll find ... :)

But come back to the reading problem ...

Erasing the buffer and Reading all the record will slow down heavly the processus of reading file.

I think the best way can be turn around with only two new instruction :

- FORCEDLOR(#v|c) : that obtain the real lenght of a record

- FORCEDINPUT #v|c,arg1,arg2,arg3
Where arg1 is the variable to store the reading string
and arg2 is the start in real of the reading file
and arg3 is the end in real of the reading file ...

So implementing a hard reading like this we can with some dev turn around the problem of the chr(0) ...

Ex :

OPEN "DateBookDB" FOR INPUT AS #1

A$­­=""
B=FORCEDLOR(#1)
A=LEN(A$­­)
C=0

REPEAT

FORCEDINPUT #1,C$­­,1,B
A$­­=A$­­+C$­­
A=LEN(A$­­)
IF A<>B C=C+1
A=A+C

UNTIL A<B

Maybe wrong thing ... but what do you think of that ?
Write to Khertan   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
--------
22/02/2005 @ 15:10
by aldweb

Anonymous

visitor
I think that it is a very good idea that you had and that it should be implemented somehow this way.

I will have to download the Tungsten T5 simulator which I guess is available at PalmOne to implement it... unless you do it with a "PP applet" in the meantime.
Then, it would ease my job to put it in the standard iziBasic.

As I am working on finalizing version 5.0 of iziBasic these days, I will need a week or so to get into this stuff.
So, dear Khertan, it's up to you: or you do the "PP applet" or you wait a little bit...

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° 5
--------
22/02/2005 @ 17:09
by Khertan

Anonymous

visitor
I think i ll wait for this ...

Because i can t dev with pp ... pascal is so far from me ... i hate a little it ... :)

Maybe i ll try if i have the time to do that ...

For info ... i ll try to parse all PIM application to make an home made Today Application that will include in the future some of my other product display.

At this time i make many project but no one is release yet. :)

In my dev plan i have :
- kBase a Simple Database (need sort and easy open database form and i will release an alpha version)
- kMoney a simple account manager with easy transaction writing without stylet.
- kWeather ... to get weather from the internet
- HeurePlus ... to manage additional hours at your work
- KalcObs a french application for "sage-femme"

it s many things ... and i m always learning iziBasic and PalmOS developpment ... but i think in 2 or 3 months i ll release some in final version.
Write to Khertan   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 ^