bugGNU Octave - Bugs: bug #36141, error message 'invalid use of...

 
 

bug #36141: error message 'invalid use of script in index expression' with inconsistent behaviour

Submitted by:  None
Submitted on:  Mon 09 Apr 2012 03:44:51 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Works For MeAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.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.

 

Mon 09 Apr 2012 04:06:35 PM UTC, comment #1:

I think the problem is that you have the file mesh.m which contains your script in the current working directory. When you call 'mesh' from the command-line it looks and finds mesh.m in the current working directory and mesh() in the Octave library of functions. The current working directory has precedence so it starts running "tx = ty = linspace ...". When Octave comes to the last line of the file it is "mesh (tx, ty, tz)". Again, Octave resolves the mesh call to the mesh.m script which does not accept arguments.

I downloaded your scripts and when I run the latest stable version of Octave (3.6.1) I get a warning message

warning: function ./mesh.m shadows a core library function

I think you can resolve your problem by simply renaming mesh.m to mymesh.m. Also, I would really recommend upgrading your version of Octave. 3.2.4 is two generations old and no longer supported. 3.6.1 is a big improvement over that earlier version.

Rik <rik5>
Project Administrator
Mon 09 Apr 2012 03:44:51 PM UTC, original submission:

using an example from http://www.gnu.org/software/octave/doc/interpreter/Three_002dDimensional-Plotting.html that once was working fine.

example from gnu.org:

following message occurs when trying to execute the example again (with no changes to the system at all in between)

it has to be mentioned that the first time the error message occured (and so i got rid of it) was after calling a function from a script file that contained the keyword 'break' for the first time.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25617:  primsurf1.m added by None (188B - text/x-objcsrc - first file is the 'break' containing file, second ist the gnu example)
file #25618:  mesh.m added by None (138B - text/x-objcsrc - first file is the 'break' containing file, second ist the gnu example)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Apr 2012 04:06:35 PM UTCrik5StatusNone=>Works For Me
      Open/ClosedOpen=>Closed
    Mon 09 Apr 2012 03:44:51 PM UTCNoneAttached File-=>Added primsurf1.m, #25617
      Attached File-=>Added mesh.m, #25618

    Back to the top


    Powered by Savane 3.1-cleanup1