.h to .d advice needed

Emp empty at nomail.com
Mon Aug 7 18:52:14 PDT 2006


Thx!
Now if only I would understand why there are  lines like these in the 
original header file:

//*** Values for DAQmx_Read_WaitMode ***
//*** Value set WaitMode ***
#define DAQmx_Val_WaitForInterrupt 12523 // Wait For Interrupt
#define DAQmx_Val_Poll 12524 // Poll
#define DAQmx_Val_Yield 12525 // Yield
#define DAQmx_Val_Sleep 12547 // Sleep
//*** Values for DAQmx_Write_WaitMode ***
//*** Value set WaitMode2 ***
#define DAQmx_Val_Poll 12524 // Poll
#define DAQmx_Val_Yield 12525 // Yield
#define DAQmx_Val_Sleep 12547 // Sleep

See the double defining. Any idea of why is this done?
I just removed all the double consts, all 100 of them :/
:)


>
> Yuck! Why do people make it hard for themselves ;-)
>
> void DAQmxErrChk( int(?) functionCall )
> {
>   if (DAQmxFailed (error = functionCall))
>      throw new DAQException("whatever");
> }
>
> Then replace the 'Error:' label with ...
>
>  scope(failure)
>  {
>    // Handle any exception thrown during this scope.
>    if (error == ...) ...
>  }
>
>
> -- 
> Derek
> (skype: derek.j.parnell)
> Melbourne, Australia
> "Down with mediocrity!"
> 8/08/2006 10:56:34 AM 





More information about the Digitalmars-d-learn mailing list