View Full Version : Delphi 5

19-07-2001, 11:28 AM
I am trying to output to a label a integer value (A number varible) The pascal commands do not work?! what is the command for outputting to a label a value? By the way i've really enjoyed the Delphi 5 articles brilliant!
Any way need help for this boggle, the code in question is:
GameMove := GameMove + 1; label10.caption := 'Moves Taken :',GameMove;
What am i doing wrong?

19-07-2001, 01:17 PM
Hi Kevin.

I'm not a Delphi user, but I suspect that if your GameMove variable has been explicitly declared as an integer rather than the Delphi equivalent of a Variant, then you'll have to convert it to a string before using it as the caption property of a label.


21-07-2001, 05:37 PM
For one thing instead of writing GameMove := GameMove + 1; Write Inc(GameMove);
label10.caption:= 'Moves Taken : ' + IntToStr(GameMove);
Remember just hit F1 for help while on a word in Delphi.