However, later some procedures get more mature and stable and we want to add some automation. This is why AMODIT is equipped with rules engine and special scripting language. Syntax is similar to C#, but is simplified. For example there are no loops, not to let user a chance to make infinite loop.
For those who are familiar with C# it is known that you have to put semicolon ";" after every statement.
a = a + 1;
b = a * 2;
But we assume that AMODIT users don't have to be experienced programmers and they can forget about semicolons. So compiler is trying to guess if there should be a semicolor and put it there itself. Thus previous example can be simply writtten as:
a = a + 1
b = a * 2
[field1] = [fields2] + 1;
However, there are some functions which perform special actions with fields. For example SignField(field,comment) function puts a signature into a sign field. First parameter is a name of a field (not its value) so you have to put is as a string:
But users very often make mistakes writing:
From syntax point of view it is error. But it is common error and we decided to make compiler smarter.
So now you can use all combinations:
- SignField("field1","my comment");
- SignField([field1],"my comment")
- SignField("[field1]","my comment")
Just the first one is really valid, but all others are tollerated because compiler can clearly recognize user's intention. And this is what I call "error tolerant programming"!