What about these huge subs, like journal scanning or ocr etc.... You have to put in thousands of line of code before the mainloop?
I would cut all those subs out into a standard library and add one line to top of script
dofile('mylibrary.lua')
And what about calling stuff? Like KalOCR... how do you go about calling that script up when needed, and interpret the results?
see above .. dofile('kalocr.lua') will load all his subs into your script.. you just dont see it and you can call all his subs like they were in your script.
What about sending arguments to a sub?? %1, %2, %3 etc...
function myfunction(arguments)
function enstest(fistarg, secondarg, thirdarg)
return firstarg + secondarg + thirdarg
end
x = enstest(1,2,3)
print(x) -- should be 6