ReneMiner
30-10-2012, 22:48
If I just put this function into my code, execution stops immediately, this function doesn't even get called!
gives strange Error-Description of missing Endif and starts a File-IO-Dialog
The CodeWindow gets screwed up, adds countless empty new lines and the code disappears finally
Function isNumeric(aString As String) As Long
' find out if aString contains just numerals and -.,
Local lCount, lLong As Long
If Len(aString) = 0
isNumeric = FALSE
Exit Function
EndIf
For lCount = 1 To Len(aString)
lLong = Asc(aString,lCount)
If lLong < 48 Or lLong > 57 Then
If lLong <> 43 And llong <> 45 And lLong <> 46 Then
isNumeric = FALSE
Exit Function
EndIf
EndIf
Next lCount
isNumeric = TRUE
End Function
Edit: found out "THEN" in 3rd line is missing. Can't it just tell that instead of messing everything up? Thank goodness I had a backup...
gives strange Error-Description of missing Endif and starts a File-IO-Dialog
The CodeWindow gets screwed up, adds countless empty new lines and the code disappears finally
Function isNumeric(aString As String) As Long
' find out if aString contains just numerals and -.,
Local lCount, lLong As Long
If Len(aString) = 0
isNumeric = FALSE
Exit Function
EndIf
For lCount = 1 To Len(aString)
lLong = Asc(aString,lCount)
If lLong < 48 Or lLong > 57 Then
If lLong <> 43 And llong <> 45 And lLong <> 46 Then
isNumeric = FALSE
Exit Function
EndIf
EndIf
Next lCount
isNumeric = TRUE
End Function
Edit: found out "THEN" in 3rd line is missing. Can't it just tell that instead of messing everything up? Thank goodness I had a backup...