Re: variable size record length file parsing




"Matt Williamson" <ih8spam@xxxxxxxxxxx> wrote

If anyone else wants to chime it, I'm listening.

You could use a class (just one instance) that exposes a Data property (String)
and all the other UDT members as properties. You would feed that class a
line at a time (via Data) and pull out the various properties for the output. That
would aloow you to do the whole file in one pass using Line Input.

Code in the Data Let method would parse the individual lines to assign the
the other properties. That would help to move that parsing code out into a
class where it can be better maintained, while also freeing up a few duties of
your main line code...

LFS


.



Relevant Pages

  • Re: read doubles from file
    ... using the BufferedWriter class, but to read it BufferedReader reads ... lines so I can't use it because I had one String for each line, ... You have used BufferedWriter. ... show an example parsing code. ...
    (comp.lang.java.programmer)
  • Re: Query out an xml element from a field containing xml data
    ... As my comfort level is much higher with C#, I just wrote some string ... parsing code and got my result:) ... Prev by Date: ...
    (comp.databases.ms-sqlserver)