I'm looking for a good way to call a function parameter outside of main WITHOUT using a global parameter.
No global parameter, because I will run more than one copy of this script at a time on the same eSignal instance.
The following PROTOTYPE doesn't work because vAlertDebug is not defined outside of Main. If I put a 'var vAlertDebug;' in the initialization area, will it be a duplicate declaration? I can create a 'var vAlertDebug2;' and assign it the value of vAlertDebug in Main() each time it is run. Or is there something else more elegant?
Also, is there a way to know when a script is FIRST run and when EDIT STUDIES is used and something is changed?
PROTOTYPE example:
// Initialize Script Area
// Pre-Main
function preMain() {
var fp1 = ~vAlertDebug~
"true"
"false"
}
// Main
function main( vAlertDebug ) {
fAlerts();
}
// Post-Main
// Actions
function fAlerts() {
if( vAlertDebug == "true" ) { debugPrintln("DANGER WILL ROBINSON!"); )
}
Thanks,
-function THEO( Man'sGotToKnowHisCompiler'sLimitations );
No global parameter, because I will run more than one copy of this script at a time on the same eSignal instance.
The following PROTOTYPE doesn't work because vAlertDebug is not defined outside of Main. If I put a 'var vAlertDebug;' in the initialization area, will it be a duplicate declaration? I can create a 'var vAlertDebug2;' and assign it the value of vAlertDebug in Main() each time it is run. Or is there something else more elegant?
Also, is there a way to know when a script is FIRST run and when EDIT STUDIES is used and something is changed?
PROTOTYPE example:
// Initialize Script Area
// Pre-Main
function preMain() {
var fp1 = ~vAlertDebug~
"true"
"false"
}
// Main
function main( vAlertDebug ) {
fAlerts();
}
// Post-Main
// Actions
function fAlerts() {
if( vAlertDebug == "true" ) { debugPrintln("DANGER WILL ROBINSON!"); )
}
Thanks,
-function THEO( Man'sGotToKnowHisCompiler'sLimitations );
Comment