[Top][All Lists]

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

Are Octave script files compiled or interpreted?

From: Torpedo93
Subject: Are Octave script files compiled or interpreted?
Date: Fri, 4 Oct 2013 11:50:16 -0700 (PDT)

Hello, so I was wondering are script files compiled or interpreted? I read
the some tutorial manuals online and they said that Octave will only look
for definitions inside the functions until they are needed. Therefore, does
it mean that it will only look for the definitions when the function is

I think I have tested a basic script file:
## Name of the file is second.m
function h = square(x)
        h = addi(x)^2;

function g = addi(x)
        g = x+5;

After I start my code by typing in "second" (w/o the "") in the command
window, it seems like it doesn't matter whether I had put the function
addi(x) before or after the function square(x).

I was also wondering is it a good practice to not use a function name that
is the same name as the file name? Because I had received errors messages
from the command window, however my code still ran properly.


20 year old university student majoring in Mathematics 
View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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