ok, i know i have some code i made with something like this somewhere but i cant seem to find it.....
How do i make a subroutine return a value, like say you send information into it and have it spit out something else without having to take extra memory storing it in an extra variable...
for example, say you have a variable "blah" that equals "something"
so blah = "something"
and you use...
newnumber = system(blah)
and you have a subroutine called system that takes blah and says something like...
if blah = "something" then
(return a value of 5)
end if
so newnumber would equal 5
How do i make a subroutine return a value, like say you send information into it and have it spit out something else without having to take extra memory storing it in an extra variable...
for example, say you have a variable "blah" that equals "something"
so blah = "something"
and you use...
newnumber = system(blah)
and you have a subroutine called system that takes blah and says something like...
if blah = "something" then
(return a value of 5)
end if
so newnumber would equal 5