Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have learned something new: how to get a run-time syntax error
#1
In the following code

Code: (Select All)
Dim a As Integer
On Error GoTo Error1

Read a
Read b

Print a
Print b
End

Dim As Integer ER, EL
Error1:
ER = Err: EL = _ErrorLine
Resume Quit



Quit:
Print "?Error"; ER; " on line"; EL; "described as "
Print _ErrorMessage$(ER)
End

Data 6
Data 7        ' the number

It will trap with an error 2 on line 5. I discovered something today:
You can't put a comment on a data statement.
Without the comment it works just fine.
While 1
   Fix Bugs
   report all bugs fixed
   receive bug report
end while
Reply


Messages In This Thread
I have learned something new: how to get a run-time syntax error - by TDarcos - 09-25-2024, 04:08 PM



Users browsing this thread: 1 Guest(s)