help-octave
[Top][All Lists]
Advanced

[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
evaluated?

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

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

========================
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.

Thanks.



-----
20 year old university student majoring in Mathematics 
--
View this message in context: 
http://octave.1599824.n4.nabble.com/Are-Octave-script-files-compiled-or-interpreted-tp4657893.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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