|
Post by hapolley on Mar 1, 2020 15:33:05 GMT
Very Minor Error:
Two Labels without an operation between them create a syntax error! I had a section Label [Section???] followed by a routine Label [Routine??] and it created a Syntax error but not on the labels themselves. It was a while, before I figured out what was causing the error.
Notice same thing happens when you go over the JB program size limit whatever size that is, a non specific syntax error rather than an error telling you your program is too large for JB.
If you fail to close a previous run window which reported an error, a similar event can happen.
|
|
|
Post by Rod on Mar 1, 2020 16:19:10 GMT
No code between two labels is a know issue but it usually only shows as an error when you compile to a .tkn or .exe
The other stuff you talk about I am less sure about, never come across a size limit. Your program would need to be really large. Broken structure can throw confusing errors a missing end if for example.
|
|
|
Post by hapolley on Mar 2, 2020 0:31:22 GMT
I read somewhere that Just Basic has a limit as to the size of the programming code, so I assumed that was the problem because taking away some unneeded Rem lines, and continuing with a new JB file, cured the problem. I am new to JB/LB and have never created a TKN, it is a problem which happens every time I tried placing two Labels together. Over all I am enjoying my experience with JB and LB, I can actually create a Variable without receiving a 'Already in Use By Command warning'. I was even able to use Global$ as a variable.
|
|
|
Post by Rod on Mar 2, 2020 11:12:15 GMT
If this did not appear in a .tkn file then it is simply your program flow that is causing the error. Be sure to use indentation properly. it is much easier to see the start and end of a conditional loop.
This runs without error which shows it wasn't the two labels causing your problem. It would have been a loose end if or next or wend that caused the problem.
[start] a=1
for n=1 to 5 gosub [nextlabel] next print a end
[nextlabel]
[andagain] a=a+a return
|
|
|
Post by tsh73 on Mar 2, 2020 14:03:11 GMT
Rod, your code does not run in Debug or Lite Debug I got about the same problem in GUI code (this is from Help on GUI with extra label added)
statictext #dialog.static, "What is your name?", 10, 10, 100, 20 textbox #dialog.tbox, 10, 30, 100, 20 button #dialog.accept, "Accept", [gotIt], UL, 10, 55 open "Name getter" for dialog as #dialog print #dialog.tbox, "Type your names in here." print #dialog, "trapclose [quit]" wait
[gotIt] [got] print #dialog.tbox, "!contents? name$" notice "Hi "; name$ wait
[quit] close #dialog end
|
|
|
Post by Rod on Mar 2, 2020 18:18:20 GMT
ok, old bug still remains, two labels are a no no.
|
|