question about generated data (strings)

Please discuss general Delphi programming topics here.

question about generated data (strings)

Postby mac1234mac » October 30th, 2008, 2:57 pm

Hello,

I have a few questions concerning below, generated printout:

A B C D E
0.000 on 0.97034 11.04377 -3.12500 -0.24468
0.031 0.97034
0.063 0.97034
0.094 0.97034
0.125 0.97034
0.156 0.97034
0.188 0.97034
0.219 0.97034
0.250 0.97034 -3.12500
0.281 0.97034
0.313 0.97034
0.344 0.97034
0.375 0.97034
0.406 0.97034
0.438 0.97034
0.469 0.97034
0.500 on 0.97034 10.70707 -3.12500 -0.24468
0.531 0.97034
0.563 0.97034
0.594 0.97034
0.625 0.97034
0.656 0.97034
0.688 0.97034
0.719 0.97034
0.750 0.97034 -3.12500
0.781 0.97034
0.813 0.97034
0.844 0.97034
0.875 0.97034
0.906 0.97034
0.938 0.97034
0.969 0.97034
1.000 on 0.97034 9.96633 -3.12500 -0.24468

What would be the best way of saving below data in Delphi 7.0?.
What strategy would be best as far as empty records are concerned?.
Data are recorded with different sample rate.
How could I save information about sample rate of particular data?.
Why if one symbol appears before decimal dot of preceeding element Delphi
program puts numbers together. For example string: '0.97034 11.04377' looks
the following way in Delphi program: '0.9703411.04377'.

One could fill empty fields with preceeding values, one could as well cut
off rows which doesn't include 6 parameters. But then I would loose the
sample rate with which parameters are recorded. So such ways are not good.

One could fill empty records with some big number, which certainly won't
appear as parameter, but could I do, in such case with two-state parameter
'on'?.

Maybe there is some other way, more comfortable and simpler?. Besides to
which data structure enter one line with parameters?. There would appear
float values and one bool value.

I'm heading towards state in which I could enter A[0.000] and get value
'on', B[0.000] and get 0.97034 value etc. If I would enter A[0.031], the
program should protest - ''there's no such value'. If I entered bad sample
rate, the program should discover it as well.

Cheers.
mac1234mac
Active Member
Active Member
 
Posts: 5
Joined: July 24th, 2008, 7:17 am

Re: question about generated data (strings)

Postby Kambiz » November 4th, 2008, 6:35 pm

Apparently this is your homework, right?

At the Resources Page of this site, you can find some good Delphi sites that may help you to do your project.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron