Posted By

zooms on 08/10/10


Tagged


Versions (?)

在delphi中显示变量类型


 / Published in: Delphi
 

  1. procedure TForm1.Button4Click(Sender: TObject);
  2. var
  3. I: Integer;
  4. S: String;
  5. W: Word;
  6. B: Boolean;
  7. D: Double;
  8. begin
  9. ShowMessage(VarTypeAsText(VarType(I)));
  10. ShowMessage(VarTypeAsText(VarType(S)));
  11. ShowMessage(VarTypeAsText(VarType(W)));
  12. ShowMessage(VarTypeAsText(VarType(B)));
  13. ShowMessage(VarTypeAsText(VarType(D)));
  14. end;

Report this snippet  

You need to login to post a comment.