Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<RunCommand id="gm.test" Prams="Mark" />

 

Another example – pre-inspection of a file:

 

Code Block
   <Load Project="%SrcPath%" SourceCode="on" />
   
   <gmSL namespace="gmSL" class="gm"><[CDATA[[
   void InspectCode()
   {
      int       levels(19);
      int       iRoot;
      tInfoFile formFile;
      Text      textStream;
      int       nRecord;
      int       curRecord;
      int       length = 0;
      int       rai = 0;
      string    record;
      string    token;
      int       lexeme;

      for(iRoot = Store.FindFirstChild(levels,0); iRoot != 0; iRoot = Store.FindNextChild(levels))
      {         
         if(Store.GetObjectType(iRoot) != ObjectType.FormFile) continue;
         string name = Symbol.FullName(iRoot,0);
         System.LogMessage("name=" + name);
         
         formFile = Store.GetVector(iRoot);
         if(formFile.textBase == 0) continue;
         System.LogMessage("formFile.textBase=" + formFile.textBase);
         
         textStream = Text.Open(Store.GetHandle(),formFile.textBase);
         System.LogMessage("textStream=" + textStream);

         nRecord = Text.Maximum(textStream);
         curRecord = 0;
         while(curRecord < nRecord)
         {
            curRecord = curRecord + 1;
            Text.Position(textStream,curRecord);
            record = Text.Access(textStream, length, rai, 0);
            if(length < 10) continue;
            Parser.SetStatement(record);
            token = Parser.GetToken(lexeme);
            if(token == "Attribute") break;
            if(token != "Begin") continue;
            token = Parser.GetToken(lexeme);
            if(token != "MSComctlLib") continue;
            System.LogMessage("record=" + record);
            while(lexeme>0)
            {
               System.LogMessage("  token=[" + token + "] lexeme=" + lexeme);
               token = Parser.GetToken(lexeme);
            }   
         }
         Text.Close(textStream);
      }
   }

   <RunCommand id="InspectCode"  />
 
	<Compile...>