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

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

- To: <femm@yahoogroups.com>
- Subject: RE: [femm] LUA scripting with complex variables (Current etc.)
- From: "Robin Cornelius" <robin.cornelius@btinternet.com>
- Date: Thu, 18 Oct 2001 22:51:25 +0100
- Importance: Normal
- In-reply-to: <9qht03+989k@eGroups.com>

    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

- References:
  - LUA scripting with complex variables (Current etc.)
    - From: dabelsteind@yahoo.com

- Prev by Date: LUA scripting with complex variables (Current etc.)
- Next by Date: single wire -magnetic potential A problem
- Previous by thread: LUA scripting with complex variables (Current etc.)
- Next by thread: single wire -magnetic potential A problem
- Index(es):
  - Date
  - Thread