bugGNU Octave - Bugs: bug #44678, Using spaces in m file names...

 
 

bug #44678: Using spaces in m file names causes error on compile

Submitted by:  None
Submitted on:  Tue 31 Mar 2015 01:25:37 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: GeneOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 31 Mar 2015 02:51:01 PM UTC, comment #1:

Hi,

This is not expected to work: imagine a script named "foo bar.m", in order to run this script you would have to type "foo bar" in the terminal. This syntax has already another meaning in Octave/Matlab language, which is "run the 'foo' function with the string argument 'bar'". However, in Octave (not in Matlab) you can run such script using "run ('foo bar.m')" but this is not considered a good practice.

Now, I could check what matlab returns when you try to run (using the "run" button in the built-in editor) such file with a space in its name. The file name was "foo bar.m":

This is definitely an equally uninformative error message.

Closing bug report.

Pantxo Diribarne <pantxo>
Project Member
Tue 31 Mar 2015 01:25:37 PM UTC, original submission:

If you use a space in a file name, the first word of the file triggers an undeclared variable error. Putting in underscores between words fixes the issue.

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 pantxo (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 31 Mar 2015 02:51:01 PM UTCpantxoStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1