Often I have a need to include or exclude certain lines in the input data files. Since SilkPerformer does not allow such, I use the following pattern:
- // get the login info
- FileCSVLoadGlobal(ghFileLogin, gcsFileLogin);
- loop
- FileGetNextUniqueRow(ghFileLogin);
- sUsername := FileGetCol(ghFileLogin, 1, STRING_COMPLETE);
- sPassword := FileGetCol(ghFileLogin, 2, STRING_COMPLETE);
- if Substr(sUsername, sTemp, 1, 1) <> "#" then exit end;
- end;
For this way, any lines starts with a hash sign (or pound sign) can safely be ignored.
No comments:
Post a Comment