[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58780] 'source' throws unexpected syntax erro
From: |
Martin Castillo |
Subject: |
[Octave-bug-tracker] [bug #58780] 'source' throws unexpected syntax error. |
Date: |
Sat, 18 Jul 2020 11:17:33 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?58780>
Summary: 'source' throws unexpected syntax error.
Project: GNU Octave
Submitted by: castilma
Submitted on: Sat 18 Jul 2020 03:17:32 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
Sorry for weird title.
1) Create foo.m with a syntax error in the current directory.
foo.m:
(1))
2) try to source foo:
octave:1> source foo
parse error near line 1 of file /tmp/foo.m
syntax error
>>> (1))
^
3) correct the file (remove last parantheses) and try to source again.
octave:1> source foo
error: no such file, '/tmp/foo'
error: source: error sourcing file '/tmp/foo'
So now it doesn't seem to look for foo.m anymore. But it's weird that it
looked at it when it was wrong.
This surprised me a little bit, but might be wanted. I.e., function files can
be sourced with the function name, but for source files, the whole filename
needs to be passed. And so it has to read foo.m, to check, whether it is a
function or not.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58780>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58780] 'source' throws unexpected syntax error.,
Martin Castillo <=