November 4, 20196 yr 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
November 4, 20196 yr 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
November 5, 20196 yr Author 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
November 6, 20196 yr 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 November 8, 20196 yr 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
November 7, 20196 yr Author 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
Archived
This topic is now archived and is closed to further replies.