bugGNU Octave - Bugs: bug #39441, SQP return variable 'info'...

 
 

bug #39441: SQP return variable 'info' conflicts with info().

Submitted by:  None
Submitted on:  Mon 08 Jul 2013 11:44:57 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Charlie HagedornOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 09 Jul 2013 01:33:55 PM UTC, comment #1:

I really don't think this is a bug nor that anything should be done about it.

Namespace collisions are something of a conscious design decision of the Matlab language. I think it's the stupidest thing of the language, but it's built-in. We have to mimic them in Octave.

The most common namespace collision is for the i or j variables, which by default are built-in functions. Do you really want to get a warning every time you do for i = 1:10? Do you also want us to change the documentation and track down every instance of where we used i or j for variables in the documentation and we didn't mean the built-in functions?

When your code started spewing Octave documentation, I suppose you would have preferred it to error out saying undefined variable?

I am tentatively closing this bug report as invalid. If you disagree, we may reopen it.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Mon 08 Jul 2013 11:44:57 PM UTC, original submission:

Severity: Low/Minor

In the documentation (and help page) for sqp, the function prototype is

[x, obj, info, iter, nf, lambda] = sqp (x0, phi)

Blindly copying that suggestion overloads the octave native function 'info()'

Would suggest a different naming convention for the function (and any others like it). It was quite a surprise to see optimization code start spewing Octave information when I switched to nmsmax where I had previously used sqp.

Is there a warning variable that can be enabled to prevent accidental overloads?

Thanks!

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 09 Jul 2013 01:33:55 PM UTCjordighStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1