Dear visitor, welcome to Jabaco - Community.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Help Please con converting some code
Hi everyoine,
I am trying to convert this code from VB6 to Jabaco
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Option Explicit
Public Function ReadIniValue(INIpath As String, KEY As String, Variable As String) As StringDim NF As IntegerDim Temp As StringDim LcaseTemp As StringDim ReadyToRead As Boolean AssignVariables: NF = FreeFile ReadIniValue = "" KEY = "[" & LCase$(KEY) & "]" Variable = LCase$(Variable) EnsureFileExists: Open INIpath, Binary, ReadAndWrite, LockReadAndWrite, NF Close NF SetAttr INIpath, vbArchive LoadFile: Open INIpath, Input, ReadAndWrite, LockReadAndWrite, NF While Not EOF(NF)
ReadLine NF
LcaseTemp = LCase$(Temp)
If InStr(LcaseTemp, "[") <> 0 Then ReadyToRead = False
If LcaseTemp = KEY Then ReadyToRead = True
If InStr(LcaseTemp, "[") = 0 And ReadyToRead = True Then If InStr(LcaseTemp, Variable & "=") = 1 Then ReadIniValue = Mid$(Temp, 1 + Len(Variable & "="))
Close NF: Exit Function
End If
End If
Wend
Close NF
End Function
|
BUt is is not work
can someone advise me as it keeps erroring out and saying this like
ReadLine is not correct