Delphi Programming Tutorial - Unit 8.12 - Converting Real Numbers to Strings in Delphi:
Real numbers include all the rational numbers, such as the integers and fractions and all the irrational numbers, such as 1.4142135. Included within the irrational numbers are the transcendental numbers, such as π (3.14159265). Real numbers can be thought of as points on an infinitely long line called the number line or real line, where the points corresponding to integers are equally spaced. Any real number can be determined by a possibly infinite decimal representation, such as that of 8.632, where each consecutive digit is measured in units one tenth the size of the previous one.
A Real in Delphi is a data type that can hold a decimal number. Decimal numbers are often referred to as “floats” or floating point numbers. Unlike strings, reals are not enclosed in inverted commas. They can also not be concatenated to strings, without first converting them to string values. In Delphi, we use the FloatToStr conversion function to convert a real to a string before displaying it in the string properties of Delphi objects, such as Captions of TLabels or Texts of TEdits, but it can also be a line added the Lines property of a TRichEdit.
In this video, we learn how to write code to read numbers from input controls, like the TSpinEdit and process them before displaying them as output in the Lines of a TRichEdit.
This tutorial (Delphi Programming Tutorial - Unit 8.12 - Converting Real Numbers to Strings in Delphi) also demonstrates how to do process and display the results of divisions.
PS. Please, help us to keep these Delphi tutorials FREE. Keep our sponsors happy and give this video a THUMBS UP. Also SHARE these Delphi tutorials with your friends and tell them to also SUBSCRIBE. Participate in discussions, ask questions and tell us about your experience in the COMMENTS section of a Delphi tutorial.
This tutorial (Delphi Programming Tutorial - Unit 8.12 - Converting Real Numbers to Strings in Delphi) is best viewed in HD. To change your settings to HD:
1. Click on the gear-icon (Settings) at the bottom of the YouTube Video Player.
2. Select "720p HD" and wait a few moments for the setting to take effect.
For more Delphi video tutorials also join us at https://www.learndelphi.net.
You may also want to visit the following resources for more information: