I have this code:
I saved this file here:
c:\BlitzMax\Mod\SG.mod\GetParameterNameNValue.mod\GetParameterNameNValue.bmx
When I choose "Build modules" in the IDE, I get an error, stating the "Instr"-identifier hasn't been found.
I tried importing BRL.Basic and BRL.Blitz (as you can see), but then I got the same error.
The docs say that the Instr-function is part of the Basic-module.
Can anyone help me with this?
Which module(s) do I have to Import to be able to build this module?
Strict Module SG.GetParameterNameNValue Import BRL.Basic Import BRL.Blitz Function GetParameterName$(LineFromFileRead$) ' This function returns the first part of the given string ' It takes all chars from the first char to the "=" and removes the spaces, tabs and the "=" from it Local PosInString% Local ParameterName$ ' Find position of the "="-character PosInString% = Instr(LineFromFileRead$, Chr(61)) ' If no match ("=") has been found, return entire "LineFromFile" (instead of nothing) If PosInString% = 0 Then PosInString% = Len(LineFromFileRead$) EndIf ' Get first chars from the string until the "=" ParameterName$ = Left$(LineFromFileRead$, PosInString%) ' Replace: ' - tab-chars (= Chr(9)) ' - spaces (= Chr(32)) ' - equal sign (= Chr(61)) ' with nothing (= ""), so only the parameter-name remains ParameterName$ = Replace$(ParameterName$, Chr(9), "") ParameterName$ = Replace$(ParameterName$, Chr(32), "") ParameterName$ = Replace$(ParameterName$, Chr(61), "") ' Return the parameter name Return ParameterName$ End Function Function GetParameterValue$(LineFromFileRead$) ' This function returns the second part of the given string ' It takes all the chars from the position of the ("=" + 2) to the end of the string Local PosInString% Local ParameterValue$ ' Find position of the "="-character PosInString% = Instr(LineFromFileRead$, Chr(61)) ' Get the last chars from the string (starting from the position of the ("=" + 2 chars)) ParameterValue$ = Mid$(LineFromFileRead$, PosInstring% + 2) ' Return the parameter value Return ParameterValue$ End Function
I saved this file here:
c:\BlitzMax\Mod\SG.mod\GetParameterNameNValue.mod\GetParameterNameNValue.bmx
When I choose "Build modules" in the IDE, I get an error, stating the "Instr"-identifier hasn't been found.
I tried importing BRL.Basic and BRL.Blitz (as you can see), but then I got the same error.
The docs say that the Instr-function is part of the Basic-module.
Can anyone help me with this?
Which module(s) do I have to Import to be able to build this module?