A Clear Syntax

C++ syntax

for(int x = 0; x < 10; x++)
{
   printf("%d\n", x);
}

Scriptol syntax

for int x in 0 .. 9 print x

Scriptol doesn't need for semi-colon et end of statements. The end of line is also the end of statement unless several statements fits on a same line, in this case they are separated by semi-colons. If an instruction fits on two lines, the compiler recognizes the instruction.

Objective design

Unlike C that was designed with limited hardware in mind, Perl that has added features day after day, and other languages that depends upon the phantasy of the author, Scriptol apply objectives rules, and it near the more used syntax in computer world, the xml one... Xml is tagged and has as C one-line syntax.
Scriptol has one-line syntax, (see above) and is tagged:

for
  ...
/for

Universal operators

Scriptol doesn't use an operator for different usages, as C uses & for deferencing or for binary and, but a same operator may have a same usage in similar cases.

For example, the range operator " .. " is used:
- as the range in the for loop (see above).
- as an interval of an array or a dictionnary (see array).
- as a range in an expression:

if x in 0 .. 9
   print
"x inside range"
/if

Types from the real word

C and Pascal in the seventeens invented types that were related to hardware: char, long, short, char *, float, etc...

Scriptol use types related to the real word: text, number, integer, natural, real, array, dict, dir, etc...

Readability

A complicated and unreadable part of C++ code...

int x[] = { 1, 2, 3, 4 };
int i;
for(i = 0; i < 4; i++)
{
  if(x[i] == test) std::cout << test << " found" << std::endl;
}


may be replaced by a single and clear Scriptol statement.

if test in { 1, 2, 3, 4 } print test, "found"

And a lot more...

This page and other pages on this site, show only a small part of the language. The manual or the book describe also:
- multiple return from a function,
- conditional assignment,
- simpler augmented assignment,
- more control structures, more data types...
etc...