[Scilab-Dev] Re: Line numbers now physical in setbpt ?

Serge Steer Serge.Steer at inria.fr
Mon Jan 19 14:25:27 CET 2009


François Vogel a écrit :
> Hi all,
>
> I have seen no reply to my message below, could Serge please tell me
> what's the situation on this subject?
>
Sorry for the answer delay.
I confirm that I have tried to make line numbering   deal with physical
line numbers in all cases.

In the exemple you mentioned, the execution is not stopped in the middle
of line 6, The logical line formed by line 6 and 7 is supposed to be in
the line 7 while line 6 is supposed to be empty.

The function foo below
function foo
  a=1
  disp(a),..
  disp('ok')
endfunction
is then equivalent to
function foo
  a=1
 
  disp(a),disp('ok')
endfunction

This is done this way because continuation marks can be put anywhere
even inside an expression ans in the silly example below
function foo
y..
=sin(..
1+..
2..
)
endfunction

Serge
> Thanks.
> Francois
>
>
> François Vogel said on 11/01/2009 17:50:
>> Hi,
>>
>> I'm slowly realizing that apparently in Scilab 5 all line numbers are
>> now physical line numbers while they were logical line numbers up to
>> Scilab 4.1.2.
>>
>> I think it's now clear from bug 3407 that line numbers reported in
>> error messages and in lasterror() are now physical (were logical in
>> Scilab 4.x).
>>
>> What I'm now realizing is that also what is managed by setbpt/delbpt
>> must now be physical and no more logical.
>>
>> Could Serge please confirm this statement?
>>
>>
>> Example (run it in Scilab 4.1.2 and in Scilab recent master to compare):
>>
>> function pllines
>>   disp("line 2  2");  // logical   physical
>>   disp("line 3  3")
>>   disp("line 4  4")
>>   disp("line 5  5")
>>   disp..
>>     ("line 6  7")
>>   disp("line 7  8")
>>   disp("line 8  9")
>>   disp("line 9  10")
>> endfunction
>>
>> setbpt("pllines",6)
>> pllines
>>
>>
>> Scilab 4.1.2 ends with:
>>
>>  line 6  7
>> Stop after row     6 in function pllines :
>>
>>
>> -1->
>>
>> I.e. Scilab 4.1.2 executed the full continued logical line 6 before
>> stopping.
>>
>> Compare with the output in Scilab 5:
>>
>>  line 5  5
>> Stop after row     6 in function pllines.
>>
>>
>> Type 'resume' or 'abort' to return to standard level prompt.
>>
>> -1->
>>
>> Here we can see that it does NOT executed logical line 6 completely,
>> thus stopping in the middle of it. However, it nevertheless states
>> that it stopped after execution of line 6.
>>
>>
>> Further observation: add setbpt("pllines",10) and you'll see it stops
>> in Scilab 5, meaning line 10 is still in function pllines. In Scilab
>> 4.1.2 it doesn't stop because line 10 is after the end of the
>> function pllines definition.
>>
>>
>> Thanks for clarifying this. If setbpt/delbpt are now really supposed
>> to deal with physical line numbers, then I'll have to make changes in
>> the Scipad debugger for Scilab 5.
>>
>> Francois
>
>




More information about the dev mailing list