Delphi ORD Function
Forum ] [ Delphi Tutorials -- by DelphiLand ]
Posted by Brett Kingston on June 09, 2003 at 15:20:38:
What data type is required for Delphi's ORD Function?
I have this working if I use a static value in the code (i.e. s := IntToStr(Ord('#'));), but if I want # to be replaced by the value of an input box, I keep getting errors. I have tried converting the input to a string, real, integer, but I have had no luck.
I have tried this:
i : integer;
s : string;
i := inputChar.Text
s := IntToStr(Ord(i));
lblNum.Caption := S;
...but with no luck. More compile errors.
Can someone help me with an example piece of code?
Related Articles and Replies:
[ DelphiLand: free Delphi source code, tips, tutorials ]