Jump to content




How To Have A Program Return A Value

computer lua help

  • You cannot reply to this topic
2 replies to this topic

#1 crazyadam0

  • Members
  • 44 posts
  • LocationWashing a ton state USA, North America, Earth, The Universe, The Multiverse (If that exists)

Posted 16 November 2013 - 06:58 PM

I am making a graphical shell and i have a log in function. I can use it as a function just fine but it brought up the question of could i have a log in program ran from the main program that returned if the log in was valid? i was wondering how to do this but i couldn't find a way to make programs return a value. is it possible to do something like shell.run("/returntest"); and have it return a value in the program returntest. (I know you cant use shell.run because that returns true or false depending on if it was successful) Is there a function to do this?

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 16 November 2013 - 07:14 PM

This is what APIs are for: Set the login program up as one, load it, call its functions, then unload it if you so choose.

#3 crazyadam0

  • Members
  • 44 posts
  • LocationWashing a ton state USA, North America, Earth, The Universe, The Multiverse (If that exists)

Posted 16 November 2013 - 11:42 PM

Thats a good idea thank you!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users