| 08-22-2007, 09:50 PM | #1 |
In the past few days I've devoted myself to learning more JASS, and accomplished alot (timers ,gamecaches, handles, now structs), but there are still a few things which I don't understand. In many JESP spells I've looked at, they use things such as a Constant Function, Private Function, Public Function, Library, etc. I looked through the tutorials here and on HiveWorkshop, and couldnt find anything about what these do. Could you tell me what each of these are meant to do and how to use them? |
| 08-22-2007, 10:02 PM | #2 | ||
A "constant" function is no different than a regular function (it was once though that they were faster) except that they can't call any non-constant function and they're inlined by Vexorian's Map Optimizer. They're normally used for configuration in JESP non-vJASS spells. A library is basically like a map's Header (Custom Script section). Quote:
As for what a Scope is, you ought to read this tutorial. Public/private functions can only be used inside libraries/scopes. A private function is one that may only be called from within the scope/library it's declared it. They may have the same name as a public function (which is the exact opposite of a private function). Toink explains it rather well: Quote:
|
