Public static bool ReadPort (int nPort)
{
Int nState=0;
Int Ret.
Ret=__ReadPort (ref nState);
If (((nState & gt;> NPort) & amp; 0 x01) & gt; 0), the key is the conversion to Delphi is how to write, 0 x01 is hexadecimal
return true;
The else
return false;
}
CodePudding user response:
Up, his topCodePudding user response:
Is an operator? Don't understand the profoundCodePudding user response:
Yes, where is the master?CodePudding user response:
If (((nState & gt;> NPort) & amp; 0 x01) & gt; 0)Delphi written
If ((nState SHR nPort) and $01) & gt; 0 then
CodePudding user response:
Help, look at what the operator, the operator use Delphi to replace is okCodePudding user response:
Public static bool ReadPort (int nPort){
Int nState=0;
Int Ret.
Ret=__ReadPort (ref nState);
If (((nState & gt;> NPort) & amp; 0 x01) & gt; 0), the key is the conversion to Delphi is how to write, 0 x01 is hexadecimal
return true;
The else
return false;
}
The function ReadPort (port: Integer);
Var
NState: Integer;
Ret: Integer;
The begin
Ret:=_ReadPort (nState);
Result:=((nState SHR port) and $1) & gt; 0;
end;