Answers

Question and Answer:

  Home  SilkTest

⟩ While (FileReadLine (hFile, sMailData)) is not doing it for each line of the input file. How do I tell it to go on to the next line and add each string to the list and add the list to the master list of list?

While (FileReadLine (hFile, sMailData)) is not doing it for each line of the input file. How do I tell it to go on to the next line and add each string to the list and add the list to the master list of list?

[+] LIST OF LIST OF STRING ParseMailFile ()

[ ] STRING sElement, sLine, sMailData

[ ] HANDLE hFile

[ ] LIST OF STRING lsMailData = {}

[ ] LIST OF LIST OF STRING llsMailData = {}

[ ] rMail Mail

[ ]

[ ] hFile = FileOpen (csDataDir+"Mail.txt", FM_READ)

[-] while (FileReadLine (hFile, sMailData))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 1))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 2))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 3))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 4))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 5))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 6))

[ ] ListAppend(lsMailData, GetField(sMailData, ",", 7))

[ ]

[ ] ListAppend(llsMailData,lsMailData)

[ ]

[ ] FileClose (hFile)

[ ] return llsMailData

[ ]

Just force it to start from first raw before the loop. Should go through each lines.

 169 views

More Questions for you: