Contents |
1. Overview |
2 Creating Scripts |
3. Executing Scripts |
4. CScript Command and Operators |
Back to Top |
You can create CScript scripts within the TinyTERM emulator or with any text editor. When creating or editing scripts within a text editor, save your script files with the .cs file extension.
Back to Top |
You can execute scripts from within the Script Editor dialog box or with the Execute Script File command on the Tools menu.
As well, you can launch script commands from the host TinyTERM is connected to by preceding the commands with \E&oF and following them with ^M, where \E is the escape character (ASCII 27) and ^M is the Enter character (ASCII 13). For example, if the hosts sends or displays the following:
the TinyTERM screen will be cleared, and the letters “OK” will display in the upper left corner.\E&oFte.cls();te.displaynl(“OK”);^M
Back to Top |
breakCScript supports these additional commands that use syntax borrowed from the C language:
continue
else
for
function
if
return
var
while
caseAll the above commands are documented in the CScript Builtin Function Reference.
default
goto
switch
CScript supports the following operators in the following order from lowest to highest precedence:
=, +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=, >>>= | assignment |
? : | conditional |
|| | logical or |
&& | logical and |
| | boolean or |
^ | boolean xor |
& | boolean and |
==, != | logical compare |
<, <=, >, >= | logical compare |
<< | logical shift left |
>> | arithmetic (signed) shift right |
>>> | logical (zero-filled) shift right |
+, - | addition, subtraction |
*, /, % | multiplication, division, modulo |
- | unary minus |
~ | boolean not |
! | logical not |
typeof | return string expression type |
void | eval expression and return nil |
new | create new object |
++ | pre/post increment |
-- | pre/post decrement |
[ ] | property reference, vector index |
. | property reference |
Back to Top |