
82
Class Reference
The value of
string
depends on the operator action.
If the operator at any time presses the right softkey (Cancel), the value of string is null.
If the operator changes the contents of the edit control to <new content> and presses
the left softkey (OK), the value of string is <new content>.
If the operator presses the left softkey (OK) without changing the contents of the edit
control, the value of string is “None” (the value entered as the second call parameter).
4.6.2
Other Functions
4.6.2.1
gc
The
gc
function cleans up memory that has been allocated but is no longer needed by the
runtime environment. This function is processor intensive, so its use can degrade
performance.
Format:
gc();
4.6.2.2
include
The
include
function executes the included script inline.
Format:
result = include(scriptName);
Where:
scriptName
– string; the name of the script to be included.
result
– Boolean;
true
if the script could be loaded and executed; otherwise,
false
.
Example:
include("myScript.js");
adds the definitions in
myScript.js
to the application. The definitions become part of the
“including” script.
4.6.2.3
The print function sends text to stdout (the active communication port), not to the OHV300
display. Limit the use of the print function to debugging. Use the comm object methods for
normal data output to communication ports.
Format:
print(text);
Where:
text
– string; debugging data to be sent to the active communications port.
Содержание OHV300
Страница 1: ...FACTORY AUTOMATION MANUAL JAVASCRIPT PROGRAMMING GUIDE...
Страница 88: ...88 Supported JavaScript Core delete function in instanceof new this typeof void...
Страница 93: ...93 Symbology ID Modifier Information...
Страница 94: ...TDOCT 4981_ENG 11 2015...