File Parsing

Discussion in 'Questions (Windows Mobile)' started by Smee, May 28, 2009.

  1. Smee

    Smee Well-Known Member Licensed User

    Hi,

    In my programming i use a library called VSAwk. It is initialy a unix function i believe. Anyway code would look like this

    vsAwk.FS = "," ' Field seperator

    While Not EOF(1)
    Line Input #1, Li$
    vsAwk = Li$ ' set the awk to the input line
    Group$ = vsAwk.f(1)
    Code$ = vsAwk.f(2)
    Description$ = vsAwk.f(3) ' define each field of the awk

    further items include
    vsawk.findline = "searchstring"
    vsawk.nf = no of fields
    vsawk.action=acscan ' Start scanning the file again
    and quite a few others.

    The question is is there a similar library in B4PPC or is anyone considering writing one?

    Many thanks

    :sign0104:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    See Table.LoadCSV.
     
  3. Smee

    Smee Well-Known Member Licensed User

    Tks Erel,

    So what you are saying is load the file in to a table, Do a search in the required column for a match, if found load the other cols to a new table then test again. when finished destroy the table.

    Is this more efficient than just quickly parsing a complete file?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Table.LoadCSV is a convenient way to pretty quickly load CSV files into a table control.
    I'm not sure what you want to do with the data once it is loaded.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice