This is an example Simkin script, it will show some of the main elements of the language
This field is an member variable of the object owning the script
InstanceData
Here is a more complex member variable
Field1 Data
Field2 Data
Here is a method which takes two parameters
return (a+b);
This method iterates over the characters in a string looking for the first 'm', returning -1 if not found
// call built-in function
length=s.length();
index=0;
while (index lt length){
if (s.charAt(index)='m'){
// call another built-in function
return index;
}else{
index=index+1;
}
}
return -1;
// Interpreter.Tracing=true; // uncomment this to get tracing
i=Method2("Simon");
trace("Index of m in Simon is: " # i);
i=true;
trace(i);