help-octave
[Top][All Lists]
Advanced

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

Re: running script files


From: LUK ShunTim
Subject: Re: running script files
Date: Mon, 16 Feb 2004 16:30:14 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

Christoph Dalitz wrote:
Hello,

while generally using the trick of a dummy "1;" statement in the first
lines of my octave scripts (as recommended in the documentation), I
wonder whether there is some Octave statement that explicitly runs
an octave script from the octave prompt. Something like

        octave> run myscript.m
or
        octave> run("myscript.m")

This would allow to run scripts with special characters in the filename
(like "example-1.2.m") and would make the use of scripts independant from
octave's belief whether it is a script or a function file.

Thanks,

Christoph


I think source("file-name") does exactly what you want.

Regards,
ST



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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