Performing Calculations and Math Using EditBoxes User input with editboxes are entered as a string datatype. The computer can not perform calculate using strings. The computer needs numbers in an integer or floating point datatype to make mathematical calculations. The solution is to convert the string into a integer of floating point number, perform the calculation, then convert the calculation back to a string so it can be displayed in the editbox or label. IntToStr() - Converts an Integer to a String StrToInt() - Converts a String to an Integer FloatToStr() - Converts a Floating Point to a String StrToFloat() - Converts a String to a Floating Point Example: edAnswer.Text := FloatToStr(StrToFloat(edFirstNum.Text) + StrToFloat(edSecondNum.Text));
Play episode as :
Oh, look at that.
No one has commented yet. Be the first!
Hey! You must be logged in to add comments. Login or Register.
The Learning Center is for those new to Web show production on blip.tv. Check out our Help Section for more information about how to use the blip.tv service.