Scriptol for robotics and web-based applications

The Script language was developed in 2001 by Denis Suro. and is determined according to 7 rules: simplicity, safety, compliance with standards, objectivity, multiple directions, portability, easy training.
The scripting code is interpreted or compiled into JavaScript, PHP or C++ code, the scripting program can be compiled into a binary executable file.
Control structures are different and more powerful than in classical languages, which allows, in particular, pattern match and automata. Security is one of the goals of the language, especially as it relates to typical variables.
Scripting is a universal language for robotics, web application implementation, scripts, prototyping, and HTML 5 applications. It allows you to integrate XML into source code.
Several of Scriptol's innovations have been embraced by languages created since 2001. It is the first language to use reactive variables that combine reactive and imperative programming.

Evolution des langages de programmation

You can use Script:

In 2014, a new version of the language appears - Script 2 with a JavaScript compiler.

Script characteristics

Syntax:

Statements end at the end of a line.
Terminators close to XML :/if ,/for, etc.
Each operator has only one function, unlike C, which reuses them differently depending on the context.
Types from real life: number, text, real,...
Compound assignments have the form:

x + 1  // signifie: x = x + 1  

Twisted data:

Scalars, xml, class.

Control structures:

If composite:

You can mix different types of comparisons and compare different types of data from one test to another.

if a
= 10: print "égal"
< 10: print "moins"
else
      print "plus"
/if 

Will:

The while structure has several forms, and the closing word let protects against endless loops .

while x < 10
  print x  
/while   // boucle infinie
while x < 10
  print x  
let x + 1  

Item Definition:

The header is similar to the C header, but several types can be returned. The final code is a return statement followed by no value if the function returns none.

int, text funcname(... arguments...)
   ...instructions...
return a, b

Simple Print command:

The print command returns a string after the text. The echo team doesn't.

print "Hello world!"

Scan two tables:

Add the contents of the two lists.

var list1=[1,2,3]
var list2=[10,20,30]
for i, v in list1
   print v + list2[i]
/for

Should show: 11 22 33.

To attach code to an HTML page:

The scriptol code is converted to PHP by the solp compiler.

<?sol
   print "code imbriqué en page html"
?>

Use active variables

This allows you to program with formulas without writing code to update variables.

react v1
react v2
react sum = v1 + v2
sum.output = 'document.getElementById("sum").value = this.value;'

The v1 and v2 variables are assigned via the HTML interface. The HTML element with ID "sum" will be updated whenever the contents of the v1 or v2 variables change.

Scriptol 2

With the advent of a compiler that creates JavaScript code, the language has adapted to a new audience. Originally created as a frontend in PHP 4, the original language simplified programming with classes and heritage, foreach, and other structures that PHP lacked at the time. PHP 5 caused Script to lose some interest, and in addition, the Hack language adding typical variables still confirms this trend. The language had to adapt to the new setting.

The syntax approached the standard that has been established over time, where another syntax itself is not of interest:

Scriptol 2 requires editing existing programs with simple substitutions without grammatical changes.

Scriptol 3

Version 3 of the language, which generates only JavaScript code, implements the concept of reactive and targeted programming. The language is also simplified to get rid of a useful feature for PHP target code only.

A target is a condition represented by an expression to which a group of statements is bound, executed in a loop before the condition is satisfied. Since it is possible to make some other goal dependent, complex treatments can be tolerated more intuitively than through procedural programming. And since goals can be asynchronous, programming a robot is also easy.

Tools and documents