Note. This question has been edited because my problem has become something completely different. You will find a direct answer to the question What the keyword for the maximal value for a floating point type? in MBo answer - use System.Math constants.
Delphi provides several types of floating point values. There are Single, Double and Extended to start with.
Last week, I looked at which keyword for the maximum floating point value and found this: http://www.delphibasics.co.uk/RTL.asp?Name=Infinity
var float1, float2 : single; begin float1 := Infinity; float2 := 23; ShowMessage('float1 = '+FloatToStr(float1)); ShowMessage('float2 = '+FloatToStr(float2)); ShowMessage('float1 - float2 = '+FloatToStr(float1 - float2)); ShowMessage('-float1 = '+FloatToStr(-float1)); end;
With an expected exit
float1 = INF float2 = 23 float1 - float2 = INF -float1 = -INF
I have a form with a component on it. This component has a couple of attributes. If I use the property editor to put Infinity as the value for the floating point attribute, I get an error that this is an invalid floating point value. The same goes for INF .
Then I typed 9.9E308 in the MaxValue field. He transformed into INF .

Feeling quite pleased with this, I kept my form and continued my work. I compiled the form later that day, having successfully verified that the form may contain the value 1E308 .
The next day...

Opening a .dfm file in notepad gives me the following:
object gridDoubleEditor: TdgmrGridDoubleEdit Tag = 0 WantKeyLeftRight = False WantKeyUpDown = False WantKeyHomeEnd = False WantKeyPriorNext = False EmptyString = '--' EmptyValue = -1E300 MinValue = -1E300 MaxValue = INF NumberOfDecimals = 2 Alignment = taRightJustify Left = 336 Top = 208 end
How does this automatically change 9.9E308 to INF, compile successfully, save successfully, but not load? Is this a bug in my IDE? I am using Embarcadero® Delphi® XE5 version 19.0.14356.6604, 32 bit in Windows 7.