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

RE: [femm] LUA scripting with complex variables (Current etc.)



lua does not has native support for complex numbers but that doesn't mean
the imaginary part has been lost.

Lua does however support some interesting variable typing that could be used
as an extension in the future to directly handle complex numbers.

LUA is unlike most languages in that it supports multiple return values.
Where there is a possibility to return a complex number the form of the lua
code is

real_part , imag_part = some_femm_function()

if you just use :-

some_var = some_femm_function()

then you will only get the 1st retured variable (the real part)

watch out that some functions return many parameters ! eg
getcircuitproperties("circuit_name") returns 6 parameters 3 pairs of complex
numbers!


Regards

Robin Cornelius