-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusing the scripting language
More file actions
46 lines (30 loc) · 1.05 KB
/
using the scripting language
File metadata and controls
46 lines (30 loc) · 1.05 KB
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
Solidus Code Script (.scs)
1) All input files to be loaded must have a file extension of scs. Therefore, a file with the name "test.scs" is valid or anything
with "*.scs"
2) Functions are the heart of the script. They are to be called from your c++ application and/or from withing your script
program.
(1) Layout of a function is as follows:
function functionName(...args...){
}
(2) you can add arguments to your function by defintion by simply adding the name of the argument
without the var keyword
example:
function functionName( arg0, arg1,arg2){
}
3) To declare variables, use use the var keyword
example:
function functionName( arg0, arg1, arg2){
var x = 0
x = (arg*2)^2
print(x)
}
4) System calls:
print(value) -prints value to console
length() -prints number of characters contained in a variable that contains a string using the
dot operator
example:
function doFunc(){
var s = "this is a string"
print( s.length())
}
the above script code prints the length of variable "s" to the console