I'm having a hard time with this one. Structure is there, constants defined. >> i & 0x10 _seems_ to be clear (at least it looks like the parts where I used that works) but with "? \ ..." the pain starts...
Restored from previous forum. Originally posted by Kale.
This is called a conditional expression and used lots in C++ and hibrids (Javascript, etc...) basically you have an expression to evaluate then 2 statements which are executed weather the expression is true or false. As christos says, it usually like this:
var = (expression to evaluate) ? var is this if true : var is this if false;
Restored from previous forum. Originally posted by Max..
If (VersionParams\bIDEDeviceMap >> i & 0x10)
bIDCmd = #IDE_ATAPI_ID
Else
bIDCmd = #IDE_ID_FUNCTION
endif
Yes, beside changing 0x10 to 16 I used it that way and it seems to do. Sadly I will only really be sure once all is done.
As I said yesterdays, was way too tired to understand your posting in the first run though it contained anything needed. The second run was better; must have been the Vodka that helped.