WritePreferenceFloat()

Syntax

WritePreferenceFloat(Key$, Value.f)
Description
Creates or changes the specified key and its associated float value under the form: 'Key$ = Value' in the preference file, previously created with CreatePreferences() or opened with OpenPreferences().

Parameters

Key$ The key name to write. If PreferenceGroup() has been used, then the write is restricted to the current group. If the key was already created, its associated value is replaced with the new specified value.
Value The float value to associate with the key.

Return value

None.

Example

  ; Create the preference file prefs.txt
  If CreatePreferences(GetTemporaryDirectory()+"Prefs.txt", #PB_Preference_GroupSeparator)
    PreferenceGroup("Window")
      WritePreferenceString("Title", "PureNote") 
      WritePreferenceLong ("X", 100)
      WritePreferenceLong ("Y", 125)
      WritePreferenceInteger("I", 1024) 
      WritePreferenceQuad("Q", 9223372036854775807)
      WritePreferenceFloat("%", 20.10)
      WritePreferenceDouble("D", 0.0123456789 )
    ClosePreferences()   
    RunProgram(GetTemporaryDirectory()+"Prefs.txt")
    EndIf

See Also

WritePreferenceDouble(), WritePreferenceInteger(), WritePreferenceLong(), WritePreferenceQuad(), WritePreferenceString()

Supported OS

All

<- WritePreferenceDouble() - Preference Index - WritePreferenceInteger() ->