D028868 CR1500 CR1100 CR2700 JavaScript Programming Guide User Manual Page 27 of 41
The Code Corporation
12393 South Gateway Park Place, Suite 600, Draper, UT 84020
+1 (801) 495-2200
FAX +1 (801) 495-0280
comm.sendHidReport
The comm.sendHidReport is not yet implemented.
13.4 Shell Functions
help([name])
The help function displays available shell commands. Optionally, [name] can be any shell command
for more detailed information on [name].
Example:
help(include);
include(name)
The include function executes the included script inline.
Example:
// Adds the definitions in myScript.js to the application.
// The definitions become part of the “including” script.
include("myScript.js");
print (string) – see reader.print(string)
The print function is an alias for the reader.print(string) method.
Example:
print(“some random text”);
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.
Example:
gc();
sleep_ms(time_ms)
The sleep function performs an inline blocking delay for time_ms number of milliseconds.
Example:
sleep_ms(1000);
format(string format, ...)
format takes a formatting string as an argument, and an argument list, to apply to the format and
then sends the formatted data back to the JavaScript, as the return value.