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

Lua questions: scripts and functions



Is it possible to call one lua script from another? For example, from 
the inside of test1.lua can I tell lua to open a file test2.lua and 
execute the instructions found there by acting the same as if the 
instructions found in test2.lua were copied into test1.lua before it 
was run? I see that one can call post processor scripts from 
preprocessor scripts, but I want to encapsulate several chunks of 
geometry drawing code without having all the code being in one lua 
file.

Do user-created functions in a lua script have to appear at the 
beginning of the script file? Or can they be at the end as well? Or 
can they be separate files in the same directory on disk?

Does femm plan to upgrade to LUA version 5? (If so, much code will 
have to be rewritten!)

p.s., I am working on lua scripts for drawing PMSMs having arbitrary 
pole and slot counts as well as several magnet shapes. They are meant 
to compliment the material in my latest book Brushless Permanent 
Magnet Motor Design.

Duane Hanselman