Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

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
    4

    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 Thumbnails Attached Thumbnails Click image for larger version. 

Name:	quott_err.jpg 
Views:	69 
Size:	80.9 KB 
ID:	7839  

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


    will give you
    Click image for larger version. 

Name:	msgbox.JPG 
Views:	60 
Size:	4.7 KB 
ID:	7840

    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
    47
    Posts
    7,622
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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

Tags for this Thread

Bookmarks

Posting Permissions

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