[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49383] Command-line options counted as as inp
From: |
Atri Bhattacharya |
Subject: |
[Octave-bug-tracker] [bug #49383] Command-line options counted as as input arguments when started as an application but not when running scripts |
Date: |
Tue, 18 Oct 2016 22:20:34 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.gnu.org/bugs/?49383>
Summary: Command-line options counted as as input arguments
when started as an application but not when running scripts
Project: GNU Octave
Submitted by: badshah400
Submitted on: Tue 18 Oct 2016 10:20:32 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Atri Bhattacharya
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.0-rc2
Operating System: GNU/Linux
_______________________________________________________
Details:
Octave seems to be counting command-line arguments as inputs (i.e.
incrementing nargin) when launched as an application, e.g., not directly
running scripts.
For example, consider the following simple script:
mytest.m
----
#!/usr/bin/octave -qf
# vim: set et ts=2 sw=2 tw=80:
disp(nargin);
----
The results printed to the screen are different based on how I run this
script:
0 ./mytest.m
0
0 octave -qf --no-gui mytest.m
0
0 octave-cli -q
octave:1> mytest
1
octave:2>
This inconsistency can cause issue with scripts depending on nargin, as the
results become dependent on how octave is invoked to run the script. This
seems a new problem with the 4.2.x branch, I have used nargin dependent
scripts with octave 4.0.x and this problem never showed up then.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49383>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49383] Command-line options counted as as input arguments when started as an application but not when running scripts,
Atri Bhattacharya <=