Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i wish there was
i wish there was a way to have a function be able to do some big complex calculation to create a big data reference table that is exactly the same each time it is called and save it between calls to avoid repeating all that work each time it is called. i know i could save it in global space, but i'd have to code the function as a module and put some name in the caller's global space. it would have been nice for functions to each have their own way to save data between calls without polluting the caller's global namespace. i suppose i can make it be a class to do it. that's how pike does it. i better not mention that language with a one-letter name.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
You could also do a closure.
Craig "Ichabod" O'Brien -
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures


Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)