help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

command line call


From: dgw
Subject: command line call
Date: Fri, 7 Aug 2015 13:06:19 -0400

Hi,

I have a question about a difference, which I noticed in how octave
treats functions vs. scripts, when calling from the command line.
(particulars: this is tested on octave 3.8.1 on a mac running 10.9.3).
When I call:

octave myscript

octave will run all of the commands in the script and then exit.
Conversely, if I call

octave myfunction

octave will simply start and quit without running the commands inside.

This behavior seems to contradict the following documentation:
https://www.gnu.org/software/octave/doc/interpreter/Invoking-Octave-from-the-Command-Line.html#Invoking-Octave-from-the-Command-Line

Is this intended? Should the documentation be reworded?

thanks
d

As a toy example:

myscript:
% myscript
%
disp('Running')

myfunction:
function myfunction
% myfunction
%
disp('Running')



reply via email to

[Prev in Thread] Current Thread [Next in Thread]