User:FinderBMap/sandbox

CPJ is not in reality pure programming language but rather subset of CPlusPlus and JavaScript. It permits to produce code which can be use directly in both cases, without any modification. Of course some part of code will be in any case language depending, particlurary Input/Output, User Interface etc. Variables. It recommended (but not limited) to use only simple types as integer, real and strings. Any other type can be replaced by. Declaration looks like :

var int

var i,j,k;

var double

var a,b;

In CPP, of course, you have to add line


 * 1) define var

JS do not support casting, it is recommended(when it nessesary) to use functions/macros which can look as following :

function ToInt(A){return A|0;}      #define ToInt(A) ((int)(A)) Typically the place where it must be applyed is math operations with integers (for example i=j/10 may yield different values in CPP and JS). It is nessesary be carrefull with array indexes, one of the area of integer using. String in CPP must be handled by some class like CString in Visual Studio.

var CString

var Text="ABC";