bugGNU Octave - Bugs: bug #42137, command syntax parse error with a...

 
 

bug #42137: command syntax parse error with a comma: "disp f(x,y)"

Submitter:  Colin Macdonald <cbm>
Submitted:  Thu 17 Apr 2014 04:14:38 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 17 Apr 2014 05:21:45 PM UTC, comment #3: 

This problem has already been fixed on the GUI branch, so I'm closing this report.

The fix will be part of the next major release, probably 4.0.

If you need this before then, you'll have to build the Mercurial sources using either the default or gui-release branch.

John W. Eaton <jwe>
Group administrator
Thu 17 Apr 2014 04:42:36 PM UTC, comment #2: 

Btw, you can say "Matlab". It's not Lord Voldemort.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Thu 17 Apr 2014 04:17:29 PM UTC, comment #1: 

Hope it was clear, example 2 is supposed to demonstrate that the different treatment is due to the comma.

Colin Macdonald <cbm>
Thu 17 Apr 2014 04:14:38 PM UTC, original submission:  

Apologies if I don't know the terminology: one can call a function without parenthesis like

disp colin

And that is the same as disp('colin').

## Example 1


disp f(x)
disp f(x,y)

The first works but latter fails.

This works in M*tl*b.  Its used in their Symbolic Toolbox and I tried to copy the feature for octsympy.  A workaround is for users to call:

syms 'f(x,y)'

or

f(x,y) = sym('f(x,y')

(the latter being all syms does anyway)


## Example 2

Octave:

>> disp foo(, disp bar
foo(
bar
>>


The other guys:

>> disp foo(, disp bar
foo(, disp bar
>>



Its the same in Octave 3.6.4, not a regression.

Colin Macdonald <cbm>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by cbm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-04-17 jwe StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-04-17 jordigh StatusNone Confirmed
        Summarynon-parenthesis function calls parse error: &quot;fcn f(x,y)&quot; command syntax parse error with a comma: "disp f(x,y)"

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code