{$IFDEF DEBUG_LK}
frmMain.up_SaveSystemLog('删除',gstrUserID,caption,
cTableName,'',cStr1,cStr2,'',uf_GetServerDate());
{$ELSE}
{$IFDEF DEBUG_ACC}
frmAccMain.up_SaveSystemLog('删除',gstrUserID,caption,
cTableName,'',cStr1,cStr2,'',uf_GetServerDate());
{$ENDIF}
{$ENDIF}
这里面的DEBUG_LK和DEBUG_ACC是怎样在那设定的???
frmMain.up_SaveSystemLog('删除',gstrUserID,caption,
cTableName,'',cStr1,cStr2,'',uf_GetServerDate());
{$ELSE}
{$IFDEF DEBUG_ACC}
frmAccMain.up_SaveSystemLog('删除',gstrUserID,caption,
cTableName,'',cStr1,cStr2,'',uf_GetServerDate());
{$ENDIF}
{$ENDIF}
这里面的DEBUG_LK和DEBUG_ACC是怎样在那设定的???
{$IFDEF DEBUG_LK}表示如果事先定义了DEBUG_LK则编译其对应{$ENDIF}之前的代码。对{$IFDEF DEBUG_ACC}......{$ENDIF}同理。
如果定义了DEBUG_LK编译这里
{$ELSE} {$IFDEF DEBUG_ACC}
否则如果定义DEBUG_ACC编译这里
{$ENDIF}
{$ENDIF}
在project->options->conditional->conditional defines添加DEBUG_LK,DEBUG_ACC
{$IFDEF DEBUG_LK}
//如果程序中有{$DEFINE DEBUG_LK},则编译:
frmMain.up_SaveSystemLog('删除',gstrUserID,caption,
cTableName,'',cStr1,cStr2,'',uf_GetServerDate());
//否则,编译:
{$ELSE}
{$IFDEF DEBUG_ACC}
//如果程序中有{$DEFINE DEBUG_ACC},则编译:
frmAccMain.up_SaveSystemLog('删除',gstrUserID,caption,
cTableName,'',cStr1,cStr2,'',uf_GetServerDate());
{$ENDIF}
{$ENDIF}