Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i wish there was
#1
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.
Skaaaaaperen........
Quote
#2
You could also do a closure.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures

Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)