Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Application Program Interviews:AutoCADBEA WeblogicBioinformaticsBizTalk ServerBug Tracking ToolsBugzillaClarify CRMCoding StandardsComputer Aided Design (CAD) DesignerCVSGIMPJMXLINQLoadRunnerMagentoMATLABMicrosoft AccessMicrosoft ExcelMicrosoft OfficeMicrosoft OutlookMicrosoft WordModel View Controller (MVC)OLAPOOADQuickbookRational RobotRDFSchemaSiebelSilkTestSVGTest PlanTesting ToolsUnity 3D DeveloperVRMLWCF SDKWPFXML DOMXPointer
Copyright © 2018. All Rights Reserved
SilkTest Interview Question:
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?
Submitted by: AdministratorWhile (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.
Submitted by: Administrator
[+] 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.
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.