Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: How to dist...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 15 Topic 8228 of 8767
Post > Topic >>

Re: How to distinguish between numerical data and alphanumeric title

by glen herrmannsfeldt <gah@[EMAIL PROTECTED] > May 13, 2008 at 09:18 AM

GaryScott wrote:
(snip)

> If I have control over the file format, I generally mark up the data
> file to indicate the type of data on each record (millions of ways to
> do that).  You could just begin each line with a process control text
> string like:

> Title:  This is the title
> Data:  a=1.2, b=6.0...
(snip)

> and so on.  If you have a large number of these, it would probably be
> faster than scanning the entire line for valid/invalid characters.

I know many programs that have a title line, then many data
lines, then another title line (for the next batch) and
many data lines, etc.  Title lines should be rare enough that
the time needed to scan one isn't significant, but if the count
of data lines is wrong, it is nice to know.

> You can add other types of data as well.  If you want to confuse
> somebody, you can make it look like html...

> <title>This is title 1
> <data>a=1.2, b=6.0...

> Wouldn't that be fun.

Then you should probably go to XML, which is designed for
this problem.  Among others, every open tag needs a close
tag, though there are also empty tags.  (In HTML, many tags
don't have a matching close, and early parsers were very
loose on the syntax, resulting in much non-standard code
that must be sup****ted.)

-- glen
 




 15 Posts in Topic:
How to distinguish between numerical data and alphanumeric titl
bru <bru@[EMAIL PROTEC  2008-05-13 09:50:32 
Re: How to distinguish between numerical data and alphanumeric t
e p chandler <epc8@[EM  2008-05-13 02:21:11 
Re: How to distinguish between numerical data and alphanumeric t
Terence <tbwright@[EMA  2008-05-13 02:49:27 
Re: How to distinguish between numerical data and alphanumeric
glen herrmannsfeldt <g  2008-05-13 02:10:19 
Re: How to distinguish between numerical data and alphanumeric t
Arjen Markus <arjen.ma  2008-05-13 05:13:52 
Re: How to distinguish between numerical data and alphanumeric t
bru <bru@[EMAIL PROTEC  2008-05-13 15:59:51 
Re: How to distinguish between numerical data and alphanumeric t
harper@[EMAIL PROTECTED]   2008-05-14 10:12:53 
Re: How to distinguish between numerical data and alphanumeric t
glen herrmannsfeldt <g  2008-05-13 14:31:17 
Re: How to distinguish between numerical data and alphanumeric t
Arjen Markus <arjen.ma  2008-05-13 12:45:03 
Re: How to distinguish between numerical data and alphanumeric t
bru <bru@[EMAIL PROTEC  2008-05-14 12:28:36 
Re: How to distinguish between numerical data and alphanumeric t
e p chandler <epc8@[EM  2008-05-13 16:19:47 
Re: How to distinguish between numerical data and alphanumeric t
glen herrmannsfeldt <g  2008-05-13 16:28:51 
Re: How to distinguish between numerical data and alphanumeric t
Arjen Markus <arjen.ma  2008-05-13 23:29:13 
Re: How to distinguish between numerical data and alphanumeric t
GaryScott <garylscott@  2008-05-13 07:12:24 
Re: How to distinguish between numerical data and alphanumeric t
glen herrmannsfeldt <g  2008-05-13 09:18:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 12:55:16 CDT 2008.