TIniFile.WriteFloat

From Soldat Community Wiki
Jump to: navigation, search
procedure WriteFloat(const Section, Ident: String; Value: Double)
 Section: Section name
 Ident: Property name (key)
 Value: Value to be assigned to a key

Description

This procedure updates an existing key's value or creates a new one.

Example

Example adds a new (useless) key to soldat.ini

const
  // assuming Sandbox Level < 2
  PATH = 'soldat.ini';

var
  Ini: TIniFile;

begin
  Ini := File.CreateINI(PATH);
  Ini.WriteFloat('BOTS','DecimalSomething',202.02020202);
  Ini.UpdateFile;
  Ini.Free;
end.