LB Booster
« Trace command »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:08am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Trace command  (Read 541 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Trace command
« Thread started on: Feb 26th, 2015, 7:31pm »

Is there a trace command in LBB, like the one in LB4?
I would really like to use it to find the problem in my 'include' program.

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Trace command
« Reply #1 on: Feb 26th, 2015, 8:47pm »

on Feb 26th, 2015, 7:31pm, Alincon wrote:
Is there a trace command in LBB, like the one in LB4? I would really like to use it to find the problem in my 'include' program.

Firstly, I would suggest that to aid debugging you temporarily remove the 'include' statement and instead paste the contents of the included file there. The program will run exactly the same, but you gain the advantage that the lines will all have different numbers.

But to get back to your question, yes LBB has a trace statement which works in a similar way to that in LB. Basically TRACE 0 and TRACE 2 work the same, but TRACE 1 behaves differently. In LBB TRACE 1 will list the line numbers, as they are executed, to the mainwin.

Richard.
User IP Logged

Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Trace command
« Reply #2 on: Feb 27th, 2015, 01:05am »

Okay the trace 2 is working, i'm getting used to the way the LBB debug process works, but I'm having trouble with the FILES statement in LBB.

My data has 10 department folders, some section folders for each department, and some people files in each section

Code:
files randomPath$, info$(    
	 fc = val(info$(0, 1))    ' folder count
     for cf = 1 to fc
        foldName$ = info$(cf, 0)
        files foldName$, info2$(
        fc2 = val(info2$(0,1))
        for cf2 = 1 to fc2
            fold2Name$ = info2$(cf2,0)
            files fold2Name$, typ$, info3$(
            fc3 = val(info3$(0,0))  'file count
              for cf3 = 1 to fc3
                x$ = info3$(cf3,0)
                if (right$(x$,3) = "sal" or right$(x$,3) = "hly") then
                    y$ = getFldr$(foldName$)
                    z$ = getFldr$(fold2Name$)
                    n = n + 1
                    emps$(n) = tb$(x$,28) + y$ +"\"+ z$ + "\"         
                end if
              next cf3
        next cf2
    next cf
 


There are no files at info$( or info2$

the code in the for-next loop beginning with this line never executes while tracing: (fc3 = 3 in the first section)
for cf3 = 1 to fc3
and the list box is never populated.

When I copy the include program code into the main program in LB4, all works as it is supposed to.

Is the FILES statement used differently in LBB?

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Trace command
« Reply #3 on: Feb 27th, 2015, 08:29am »

on Feb 27th, 2015, 01:05am, Alincon wrote:
Is the FILES statement used differently in LBB?

No, it should work in an identical fashion. There was of course the issue you reported yourself in January (related to the drive letter being omitted) but that was fixed in LBB v2.86.

In fact the code you listed looks very similar to the code which you reported failing in January! Is this the same issue which has returned despite the fix, or something different coincidentally affecting the same piece of code?

Richard.

User IP Logged

Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Trace command
« Reply #4 on: Feb 27th, 2015, 12:41pm »

My bad. For some reason, I didn't realize it was the same issue.
But I got to experiment with include, trace and the debugging process.

Please repeat the instructions for upgrading to the latest LBB version. I don't know where 'the usual place' is. Or should I wait for the 'big' upgrade in March?

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Trace command
« Reply #5 on: Feb 27th, 2015, 1:54pm »

on Feb 27th, 2015, 12:41pm, Alincon wrote:
Or should I wait for the 'big' upgrade in March?

You might as well wait. Barring unforeseen snags, I'm hoping to release it on Sunday (1st March).

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls