[EDIT] There seems to be some correlation to the fact I`m trying to create a lib with mpz`s tailbite for 5.4 having delete the lib and restarting the compiler autocomplete seems to behave as expected.
Hi Fred below is my procedure Which I have a dozen times tried to name it "Extract_From_Http_FoodData(" the instant I get to the last "a" before the bracket Autocomplete changes the procedure name as below as you see the procname becomes "ExtractJSONArrayp_FoodData(" on occasion is has been "ExtractXMLArray_FoodData("
Reproducible for me by going to an new file start type extract_from_http_foodata as you hit the last "a" then the proc name will change, case seems to make no difference nor being a proceduredll
Zebuddi.
Code: Select all
ProcedureDLL.s ExtractJSONArrayp_FoodData(Url.s);Extracts Data From web page source (cals,fat,carb,prot)
Protected regex_title.s = "(?<=<title>Calories in ).+and"
Protected regex_fooddata.s = "(?<="+Chr(34)+"factValue"+Chr(34)+">).*<"
Protected regex, regex_foodname, *buf, b$, Nbr, i, buff$, foodname$, f$
If InitNetwork()
*buf = ReceiveHTTPMemory(Url)
If *buf
Dim exd$(0)
Dim exf$(0)
regex = CreateRegularExpression(#PB_Any, regex_fooddata)
regex_foodname = CreateRegularExpression(#PB_Any, regex_title)
If regex
b$ = PeekS(*buf,-1, #PB_Ascii)
If MatchRegularExpression(regex, b$)
Nbr = ExtractRegularExpression(regex, b$, exd$())
If Nbr
For i = 0 To Nbr-1
buff$ + exd$(i) + Chr(124)
Next
EndIf
ExtractRegularExpression(regex_foodname, b$, exf$())
foodname$ = exf$(0)
EndIf
FreeRegularExpression(regex)
FreeRegularExpression(regex_foodname)
FreeArray(exd$())
FreeArray(exf$())
FreeMemory(*buf)
If buff$
CallDebugger
f$ =Chr(34) + RemoveString(Mid(foodname$, 1, Len(foodname$)-3) + Chr(124), Chr(34)) + RemoveString(RemoveString(buff$, Chr(60)), Chr(34)) + Chr(34)
f$ = RemoveString(f$, Chr(34))
ProcedureReturn f$
EndIf
EndIf
Else
MessageRequester("NetWork Error", GetLastErrorAsText(GetLastError()))
EndIf
Else
MessageRequester("NetWork Error", GetLastErrorAsText(GetLastError()))
EndIf
EndProcedure