From: "bennie blackwell" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Saturday, 6 August 2011 9:02 AM
Subject: issues with internal read
>I am trying to parse the below record, determine the number of chemical
> species present and their associated names.
>
> C2H2,acetylene C3 C4 C4H2,butadiyne C5 HCN H2 H2O N2 CH2OH
>
> Note that the first specie in the list is "C2H2,acetylene" to differentiate
> it from "C2H2,vinylidene" in the thermodynamic data base that I am using.
> The routine shown below works if ",acetylene" was not present in the specie
> name. Unfortunately, the internal read assumes the comma is a delimiter as
> opposed to part of the specie name. Is there any way to temporarily
> "suspend" the interpretation of "," being a delimiter?
Use an explicit format.
Also, the statement
instring = trim(instring)
is going to put the trailing blanks back in.
As well, LEN_TRIM can do the same as the loop.
|