array[boolean] of Integer?能不能解释一下:) ( 积分: 20 )

  • 主题发起人 主题发起人 everhappy
  • 开始时间 开始时间
E

everhappy

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TCustomComm.SetDTRState(State: boolean);
const
DTR: array[boolean] of Integer = (CLRDTR, SETDTR);
begin
EscapeComm(DTR[State]);
end;
array[boolean]相当于array[0..1]吗?
 
procedure TCustomComm.SetDTRState(State: boolean);
const
DTR: array[boolean] of Integer = (CLRDTR, SETDTR);
begin
EscapeComm(DTR[State]);
end;
array[boolean]相当于array[0..1]吗?
 
array[boolean]相当于array[False, True]
 
See:
ShowMessage(IntToStr(Ord(True)));
//ShowMessage(IntToStr(Ord(False)));
 
array[boolean]值的范围位0..1
 
boolean = 0 , 1
 
后退
顶部