True Basic to C++


I am new to True Basic. I was wondering if there is a converter from True Basic to C++. Thanks,


TB to C++


I am pretty sure there is no such thing as a TB to C++ converter. However, some years ago I wrote a TB to C converter. Since then the C standard has been change slightly to allow limited dynamic arrays. C doesn't normally allow redimensioning of multi-dimension arrays, whereas TB does. Other than that the conversion process is not that difficult, although I found it necessary to develop an intermediate library of TB statements that were written in C to achieve the same objective. In other words the conversion process is a two stage process:
(a) convert TB statements and functions into an equivalent set of functions that do the same thing but can be written in C, for example SET COLOR n becomes set_color(n). Similarly SET COLOR MIX (n) r,g,b becomes set_color_mix(n,r,g,b)
(b) convert the intermediate code into real C
Although this conversion program worked and produced programs that also worked, the resulting code was hardly recognizable to normal C programmers because it contained so many unfamiliar intermediate functions. On the other hand the resulting code could be easily understood by anyone familiar with TB code.

Big John