-
Notifications
You must be signed in to change notification settings - Fork 4
/
jual_reference.txt
113 lines (94 loc) · 2.54 KB
/
jual_reference.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
## DATA TYPES
Number
String
## CONDITIONALS
if (condition) { statements; };
if (condition) { statements; } else if (condition) { statements; };
## CONTROL STRUCTURES
break;
for (init; condition; increment) { statements; };
for (variable in AssocArray) { statements; };
while (condition) { statements; };
do { statements; } until (condition);
## OPERATORS
Arithmetic + - / * %
Compound Arithmetic += -= *= /= %=
Logical && || !
comparisons == != < <= > >=
Bitwise & | ^ ~ << >>
STANDARD LIBRARY
## GENERAL Functions
isNaN(var) // for compatibility with Javascript
parseInt(szText, iRadix)
parseFloat(szText);
isNum(cChar)
isAlpha(cChar)
noexpr(szString) // use with replace for no regular expression (i.e exact match)
## NUMBER Functions
number.toString(radix)
## STRING Functions
// Assume that functions requiring an index does not support negative indexes.
// Assume result is undefined when a negative index is passed.
// the only exception is the slice method which only support 1 positive or negative index or 2 positive indexes
string.charAt( iPos_0based )
string.charCodeAt( iPos_0based )
string.fromCharCode(iCharactercode0, iCharacterCode1)
string.indexOf( szSearch, [iStart] )
string.len()
string.replace( szSearch, szReplacement )
string.split( szSeparator)
string.slice( iStart_0based, [iEnd_0based] )
string.toLowerCase()
string.toUpperCase()
## Array function
array.join(szSeparator)
## TO BE IMPLEMENTED
## Binary string operations ( also works on normal strings )
getByte (szBinaryString, iPos);
setByte (szBinaryString, iPos, iValue);
compress ( szBinaryString , szAlgorithm);
uncompress ( szBinaryString , szAlgorithm);
base64enc ( szBinaryString );
base64dec ( szBase64String );
## MATH Functions
Math.abs( iNum );
Math.acos( iNum );
Math.asin( iNum );
Math.atan( iNum );
Math.atan2( iNumY, iNumX );
Math.ceil( iNum );
Math.cos( iNum );
Math.exp( iNum );
Math.floor( iNum );
Math.log( iNum );
Math.max( iNum1, iNum2, ..., iNumN );
Math.min( iNum1, iNum2, ..., iNumN );
Math.pow( iNum );
Math.random();
Math.round( iNum );
Math.sin( iNum );
Math.sqrt( iNum );
Math.tan( iNum );
## DATE object
date.getFullYear();
date.getMonth();
date.getDate();
date.getHours();
date.getMinutes();
date.getSeconds();
date.toLocalISOString();
## FILE Functions
io.close(hFile);
io.flush(hFile);
io.exists(szFilename);
io.open(szFilename, szMode);
io.readbyte(hFile, iNumBytes);
io.readline(hFile);
io.seek(hFile, iPosition);
io.size(hFile);
io.writebyte(hFile, szData);
## OS Functions
os.getenv( szVarName );
os.exit( [iExitCode] );
os.execute( szCommand );
os.gettime( blUTC );