bugGNU Octave - Bugs: bug #56068, The echo command goes in action...

 
 

bug #56068: The echo command goes in action only after the SECOND line

Submitted by:  None
Submitted on:  Wed 03 Apr 2019 11:29:20 PM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Confirmed Assigned to:  None
Originator Name:  Naftali Kidron Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.1.0
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 06 Apr 2019 04:08:54 AM UTC, comment #4:

The issue is bound up with the way the parser is processing the echo command.  Any lines between the issuance of "echo on" and the first valid command are not echo'ed appropriately.

I used a slightly different test file (tst_ps42.m which is attached)

echo on
# comment 1
a = 1
# comment 2
b = 2
c = 3

I then turned on echo before running the script. 

echo on
tst_ps42
+ echo on
a =  1
+ # comment 2
+ b = 2
b =  2
+ c = 3
c =  3
+

In this case, the line "# comment 1" and the line "a = 1" are not echo'ed.  After that, things proceed as they should until the end where there is an extra blank line that is echo'ed.

(file #46726)

Rik <rik5>
Project Administrator
Thu 04 Apr 2019 09:33:11 PM UTC, comment #3:

This may be related.  Running tst_ps4 in the CLI there is an echo of an empty line after the last line in tst_ps4.m.  There is no valid Octave code line there and thus there should not be an empty echo statement.

octave:1> tst_ps4
a =  1
+ b = 2
b =  2
+ c = 3
c =  3
+
octave:2>

(file #46722)

Rik <rik5>
Project Administrator
Thu 04 Apr 2019 09:29:57 PM UTC, comment #2:

I filed a separate bug report (bug #56065) about the fact that "+ " does not prefix echo'ed lines in the GUI.

Rik <rik5>
Project Administrator
Thu 04 Apr 2019 04:33:28 AM UTC, comment #1:

There is a difference between the GUI and the CLI, and between versions.  The CLI in version 4.2.1 gets this right.  The output of the script is

a =  2
+ b = 2 + 1
b =  3
+ B = 2 + 1
B =  3
+ echo
c =  4
C =  4
+ d = 4 + 1
d =  5
+ D = 4 + 1
D =  5
+ echo

Already in version 4.4.1 of the CLI it is broken and the echo starts on the second line.

echo doesn't seem to work correctly at all in the GUI.  The line that is about to be executed should be prefixed with '+ ' but is not.

I've attached the script used for testing to this report.

(file #46716)

Rik <rik5>
Project Administrator
Wed 03 Apr 2019 11:29:20 PM UTC, original submission:

the script:

a = 1 + 1
echo on
b = 2 + 1
B = 2 + 1
echo
c = 3 + 1
C = 3 + 1
echo
d = 4 + 1
D = 4 + 1
echo

resulting in

>> ECHO
a =  2
b =  3
B = 2 + 1
B =  3
echo
c =  4
C =  4
d =  5
D = 4 + 1
D =  5
echo
>>

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46726:  tst_ps42.m added by rik5 (50B - text/x-matlab)
file #46722:  tst_ps4.m added by rik5 (26B - text/x-matlab)
file #46716:  tst_echo.m added by rik5 (93B - text/x-matlab)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-06 rik5 Attached File- => Added tst_ps42.m, #46726
    2019-04-04 rik5 Attached File- => Added tst_ps4.m, #46722
    2019-04-04 rik5 Attached File- => Added tst_echo.m, #46716
        Item GroupOther => Regression
        StatusNone => Confirmed
        Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.4