Difference between revisions of "TES5Edit Scripting Functions"

Jump to navigation Jump to search
→‎Pascal implementation: interface/implementation are broken in JvInterpreter
imported>DavidJCobb
m (→‎Pascal implementation: forgot a link)
imported>DavidJCobb
(→‎Pascal implementation: interface/implementation are broken in JvInterpreter)
Line 838: Line 838:
*** And no, Delphi has no equivalent to <code>#pragma once</code>, and JvInterpreter wouldn't support it anyway
*** And no, Delphi has no equivalent to <code>#pragma once</code>, and JvInterpreter wouldn't support it anyway
* According to Delphi documentation across the web, Const directives inside of functions and procedures are supposed to define static local variables: these variables are not supposed to be constants, and their values are supposed to persist until the script has finished executing. However, in JvInterpreter, Const directives in functions and procedures just define ordinary local variables, whose values will be lost the instant the function or procedure finishes executing. Among other things, this means you can't use getters with static variables to work around the issues with global variables.
* According to Delphi documentation across the web, Const directives inside of functions and procedures are supposed to define static local variables: these variables are not supposed to be constants, and their values are supposed to persist until the script has finished executing. However, in JvInterpreter, Const directives in functions and procedures just define ordinary local variables, whose values will be lost the instant the function or procedure finishes executing. Among other things, this means you can't use getters with static variables to work around the issues with global variables.
* The scripting environment will not throw errors upon encountering the <code>interface</code> or <code>implementation</code> keywords, but it also does not honor them: definitions within the implementation will be available to a file's users. It appears that these keywords are purely semantic.
** JvInterpreter does not throw errors if you redefine a function within the same file, even if the redefinition changes that function's signature; it simply uses the last definition.


==== xEdit extensions to JvInterpreter ====
==== xEdit extensions to JvInterpreter ====
Anonymous user

Navigation menu