YAIP
Authors
Data
Syntax
Syntax of this language is similar to C++. In here available are all of base operators and what moreover the power operator '^' is also implemented. Data can be written on standard output by simple:
<< "word";
Data can be read in similar way:
>> variable;
In here are available three types: int, str (string), fl (float). This language has own casting mechanism. It can be invoked explicit:
int i = (int) "3";
, and also implicit. In case of explicit casting and variables which cannot be cast as result '0' is obtained. In case of implicit casting and the same variables realtime error will occur.
String variables can be concatenated by '+' operators. In here implicit casting also occurs.
In here is a promotion to the most extended type, so in case:
int a = 2 + 3.1;
will occur: Error at line 3: Broken probe of not formalized casting: Can't do assignment of float type to integer type.
Hierarchy of types:
- str
- fl
- int
if-elseif-else conditional instructions also can be used as well as functions. Functions do not return anything and their parameters are passed by reference (without any '&' operator):
func f1 (int b) { ++b; if ( b < 100 ) f1 (b); int a = 0; } int a = 90; << "'a' before: " + a; f1 ( a ); << "'a' after: " + a;
Will returns:
'a' before: 90 'a' after: 100
