CAPL Script

WriteProFileFloat

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Note Before this function can be called the writepathmust be set by the functionsetWritePath. Otherwise the configuration directory will be used. A relative file name must be passed to the function.

Syntax

long writeProfileFloat(char section[], char entry[], float value, char filename[]); // form 1

long writeProfileFloat(char section[], char entry[], float value, char filename[], dword utf16); // form 2

Function

Opens the filefilename, searches thesectionsection and writes the variableentrywith thevaluevalue. Ifentryalready exists the oldvalueis overwritten.

Parameters

section Section of the file as a string.

entry

Variable name as a string.

value

Value as a float.

filename

File path as a string.

utf16

If this flag is set the file will be UTF-16LE encoded if it is newly written, or interpreted as such, if the corresponding BOM is also present.

Return Values

The functional result is0in case of an error.

Example