the location of the declaration only matters in interpreted mode, where variable are untyped by default and typed on demand.
by contrast, in compiled mode, all variables are typed during compilation, by scanning all occurrences of C_@ commands. it doesn't matter if the declaration is conditional or not, even if you do something like If (False) C_LONGINT(myVar) End if or do so in a method that is never called, MYVAR (it is converted to upper case) is still detected and compiled. good place to start is to "generate typing" to see how exactly the compiler has analysed your variables. http://doc.4d.com/4Dv16/4D/16.3/Compiler-window.300-3670747.en.html 2018/08/01 6:46、Noah via 4D_Tech <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール: The variable was declared in the on Load form event, and this code has worked without a problem for many versions back. I was able to quickly bypass the runtime error by moving the variable declaration out of the conditional block which only ran once (when the form loaded) into the form method itself (not wrapped in a conditional). ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************