Jump to content

Sign in to follow this  
svenks

Passing parameters to Linda functions?

Recommended Posts

Well, the title says it all...

Is it possible to pass a parameter to a Linda function, say like one in User module?

If I define a function that needs a parameter eg "function RC4_Set_Keycode(keypress)", the Linda GUI doesn't seem to allow me to enter a value for keypress - or have I missed something?

BRGDS

Sven Sorensen, EKCH

Share this post


Link to post
Share on other sites

LINDA can use parameter passing as defined by the LUA programming language. However, assigned functions can not pass parameters. If you are using a particular value then this must be stored as a variable that the called function can access. 


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Thank you for your reply, Andrew.

By "assigned functions", you do mean the ones assigned to a button in the Linda GUI, right?

Not a really big issue in this case, but wouldn't it be worth looking into?

I can think of lots of situations where your code would get much simpler if you could pass one or more parameters. I now use 4 functions to handle the double trigger functionality on my X52 Pro joystick. If I could pass a parameter, I would need only 2...

Then again, it might be to tricky to implement.

Thanks again, BRGDS

Sven Sorensen, EKCH

Share this post


Link to post
Share on other sites

Yes, assigned functions are those programmed against a button/switch.

Code may be simpler if parameters could be used with assigned functions. However, that is not how LINDA was originally designed by others and I am not minded to even try working out what changes I would need to make to the core software to accomplish it.

Edited by ScotFlieger

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites
21 hours ago, ScotFlieger said:

I am not minded to even try working out what changes I would need to make to the core software to accomplish it.

Haha, good one, Andrew.

No worries 🙂

/Sven

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    45%
    $11,475.00 of $25,000.00 Donate Now
×
×
  • Create New...