delphi BoolToStr函数使用
procedure TForm1.Button1Click(Sender: TObject); var b: Boolean; s: string; begin b := True; s := BoolToStr(b); ShowMessage(s); {-1} b := False; s := BoolToStr(b); ShowMessage(s); {0} b := True; s := BoolToStr(b, True); ShowMessage(s); {True} b := False; s := BoolToStr(b, True); ShowMessage(s); {False} end;