Tuesday, May 10, 2016

SilkPerformer: Comments in Data Files

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:
  1. // get the login info  
  2.     FileCSVLoadGlobal(ghFileLogin, gcsFileLogin);  
  3.     loop  
  4.       FileGetNextUniqueRow(ghFileLogin);  
  5.       sUsername := FileGetCol(ghFileLogin, 1, STRING_COMPLETE);  
  6.       sPassword := FileGetCol(ghFileLogin, 2, STRING_COMPLETE);  
  7.       if Substr(sUsername, sTemp, 11) <> "#" then exit end;  
  8.     end;  
For this way, any lines starts with a hash sign (or pound sign) can safely be ignored.

No comments:

Post a Comment