Home »
Public Forums »
archive »
data type determination in a file
data type determination in a file [message #27405] |
Sun, 21 October 2001 09:07 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Hi my friends,
I like to add some more functionality to my read_data_file routine.
This routine is much faster as read_ascii and it determines itselfs
the file architecture of header, comments, arrayed data (columns,lines),
separator and trailer comments.
The template for read_ascii uses fixed sizes of comments and columns.
Less comments in an other file means the first datalines are missing.
You will
find them in the header or you have to change the datastart val every
time.
Because of an execute statement in read_ascii it could not be used in
runtime.
While read_ascii is line dependet and the user gives the delimiter of
the columns
and the type of each column this routine is able to read string data
as well as number data from a string line.
With FIX and the type identifier given from the user it translates the
column fields
to the right type (nice feature of FIX).
Because of the READS statement I am using to read the data array
at once from a string array I see no chance at the moment to
mix strings and numbers. (It is possible to remove some of the string
characters
e.g. remove_char= ':' then 12:10:00 gives three columns)
I like to add to read_data_file a struct array of type dependent tags.
Therefore I like to determine the type of data of each column of the
ASCII file.
(Struct arrays could be shown by widget_table type dependent too. )
If the data holds only numbers it is very easy to change from data array
to struct array. But in addition I like to return each tag in it's
necessary
data type without any user information.
(Perhaps it could be overwritten by the user)
Is a routine already available which determines from a double number
which type
is really neccessary?
Or did someone has an idea how to determine types from an ASCII file
,string or byte array ?
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======
read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
|
|
|
Current Time: Fri Oct 10 08:19:43 PDT 2025
Total time taken to generate the page: 0.40040 seconds