Origin Ver. 7.5 / SR0
WinXP SP2
-------------
Hello,
the Origin Programming Help says there are some Preprozessor directives like #define, #if, #elif, #endif ...
I want to build a TRACE-System for better debugging, that compile only if a the PreProcessor-Variable is set to 1.
Here is a short example:
#define TRACE 0
void importmultiwas() {
int iNumSelFiles;
StringArray saFiletypes, saFilePaths;
saFiletypes.SetSize(1);
saFiletypes[0]="[OSA-ASCII-File (*.WAS)] *.WAS";
iNumSelFiles = GetMultiOpenBox( saFilePaths, saFiletypes );
/*--BEGIN-TRACE--------------*/
#if TRACE
out_int("Num_Of_Files_selected = ", iNumSelFiles);
out_str(saFiletypes[0]);
for (int i=0; i<iNumSelFiles; i++) {
out_str(saFilePaths[i];)
}
#endif
/*--END-TRACE----------------*/
}
This example compiles without any error and it shouldn´t compile and execute the part marked as BEGIN/END-TRACE until TRACE is set to 1, but it does. I cannot see any mistake
Thank you,
datrix