Under ooBASIC in a spreadsheet, I keep getting an error message saying,
"BASIC syntax error
Unexpected symbol (
-----------------------------
Above is end of error message. See below for the location of the error message.
(snip)
-------------------------------------
Code: Select all
Function run_one_char (chars As String) As Long
Dim first_char As Long
Dim first_char_2 As Long
first_char = CLng (Asc (chars))
REM Print "first_char =", first_char
first_char_2 = first_char * first_char
REM Print "first_char_2 ", first_char_2
run_one_char = first_char_2
Exit Function
End Function
REM The error message arrow is beside
REM (Accepted value as String
Function TLU1_
(Accepted_value As String, _
NotFound As Boolean) As Long
Dim ans1 As Long, ptr As Long,LoopBreaker As Long
ans1 = char_hash1 (accepted_value)
ptr = ans1 MOD NBrandTab
print "Accepted_value = ", Accepted_value
print "ptr = ", ptr
MainLoop:
If (BrandTab (ptr) = "") Then
TLU1 = ptr
NotFound = True
EndIf
REM BrandTab entry not = ""
REM Slot not empty
If (Accepted_value = BrandTab (ptr)) Then
TLU1 = ptr
NotFound = False
Exit Function
EndIf
REM No match but slot not empty
REM Either collision or just not found
REM Scan down and look for match
ptr = ptr + 1
ptr = ptr MOD NBrandTab
LoopBreaker = LoopBreaker + 1
If (LoopBreaker >= NBrandTab) Then
print ("LoopBreaker error")
Stop
EndIf
GoTo MainLoop
End Function
(snip)
End of file
From Tom:
ooOrg 3.2.1
Win XP Home SP3
Your advice?