Results 1 to 4 of 4

Thread: Wrong error_line nuber

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Location
    Taiwan
    Posts
    10
    Rep Power
    14

    Question Wrong error_line nuber

    Please look at the attached jpg file.
    The error line should be #6, but the report is #15.
    This could be troublesome for a newbie, if the program is lengthy.
    Attached Images Attached Images

  2. #2
    thinbasic suport the multilines strings such as
    msgbox 0, "this is
    a test
    end sub
    end"


    will give you
    msgbox.JPG

    in your code note that end sub are in light red color ie the same as what is inside quotes, the debugger think that all words after the first quote are a string until he reaches the second quote. but there is no second quote. so it gives the correct info. ie "missing quote _ Line number 14"
    it is not an excellent debugger, but informative, and sometimes good and sometimes very good.
    Last edited by zak; 07-03-2012 at 09:09.

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Hi chliu,

    zak is correct. thinBasic supports implicit line continuation and multi line strings.
    In your code there is no double quote so thinBasic parser continues till it will find a double quote or the end of the script whichever comes first. In this case end of script comes first. At that time parser is able to produce a run time error.

    Yes, maybe it should interpret the situation better but the advantages of having such a functionality (I mean: multi line strings) is great for many programmers.
    I will see if I can improve error handling a bit is such circumstance

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    Junior Member
    Join Date
    Mar 2012
    Location
    Taiwan
    Posts
    10
    Rep Power
    14

    Thumbs up

    Thank you for all your answers.
    Anyway, thinBasic is so friendly, like old friends (qb45,vb6)
    and it even does much more things then them!
    A wonderful language, I love it!

Similar Threads

  1. something wrong
    By danbaron in forum O2 JIT Compiler / Assembler / Oxygen project
    Replies: 3
    Last Post: 30-08-2011, 08:40
  2. EXE_EnableException : Wrong syntax
    By Petr Schreiber in forum Fixed or cleared errors in help material
    Replies: 1
    Last Post: 02-07-2009, 07:22
  3. wrong text XML help
    By Michael Hartlef in forum Fixed or cleared errors in help material
    Replies: 1
    Last Post: 16-09-2008, 16:15

Members who have read this thread: 0

There are no members to list at the moment.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •