octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58009] Problems with parsing m-files: overwri


From: anonymous
Subject: [Octave-bug-tracker] [bug #58009] Problems with parsing m-files: overwritten old version is executed
Date: Wed, 18 Mar 2020 14:59:46 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

URL:
  <https://savannah.gnu.org/bugs/?58009>

                 Summary: Problems with parsing m-files: overwritten old
version is executed
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 18 Mar 2020 06:59:45 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
                 Release: 5.1.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

version 5.1.0
configured for x86_64-w64-mingw32
WIN10, Intel i5

Write m-file Test.m with content:


for i=1:3
  i*i
endfor


Save it,run it. You will see:
>> Test

ans =  1
ans =  4
ans =  9
>>

Everything ok. Then edit Test.m:


for j=1:2
  for i=1:3
    i*j
  endfor
endfor


and save it.

Put a breakpoint on line 3 (line with i*j)
This fails! => Error
The red dot appears on line 4 (instead of line 3).

Remove the breakpoint.
Running Test.m yields now:

>> Test

ans =  1
ans =  4
ans =  9
>>

This is the expected result of the previous version => Error

Re-running Test.m produces then the right result:

>> Test

ans =  1
ans =  2
ans =  3
ans =  2
ans =  4
ans =  6
>>

Now the breakpoint on line 3 can be placed correctly.
Place it, and run test.m. Now we get:

>> Test

warning: function file 'D:\Test.m' changed since it was parsed
warning: called from
    Test at line 3 column 6
stopped in D:\Test.m at line 3
3:     i*j
debug>

I think this is also an error. The file was saved before running it.
Now I step through the program using F10 (single step). Now we see:

debug>
ans =  1
ans =  2
ans =  3
ans =  2
ans =  4
ans =  6
>> ug>

Results are correct, but in the last line, the text 'debug>' was cancelled
only 
partially, we see 'debug>' overwritten by '>> '
This is also a kind of error.

By the way, stepping through the program using F5 (not F10) doesn't show this
error.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58009>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]