Support Forums > WinFBX - Windows Framework for FreeBASIC

CInifile Documentation

(1/1)

SeaVipe:

Hi Josť, a typo in the documentation for CInifile

--- Code: ---DIM cIni AS CInifile = "Test.ini"
DIM csa AS CSafeArray = GetKeyNames("Startup")
FOR i AS LONG = csa.LBound TO csa.UBound
   print csa.GetString(i)            ' <-- S/B GetStr()
NEXT

--- End code ---

Josť Roca:
The correct name is GetString. I only see GetStr in the comments of the source code. Is taht what you mean?

SeaVipe:
Sorry Josť, I wasn't very clear. I should have written the 'Example' in cInifile documentation for 'GetSectionNames'.

--- Quote ---This line in the example code "print csa.GetString(i)" throws error 18: Element not defined, GetString in 'print csa.GetString(i)'
--- End quote ---
Change GetString to GetStr and the code compiles and works correctly.
Use 'GetStr' for CSafeArray and 'GetString' for CIninfile.

Bumblebee:
Should also be:
DIM csa AS CSafeArray = cIni.GetKeyNames("Startup")

Josť Roca:
Ok. I have modified it. Thanks for reporting it.

Navigation

[0] Message Index

Go to full version