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
length=length(s); // call built-in function length()
index=0;
while (index lt length){
if (charAt(s,index)='m'){ // call another built-in function charAt()
return index;
}else{
index=index+1;
index=index/1;
index=index*1;
index=index%1;
}
}
return -1;