GLBasic forum

Main forum => GLBasic - en => Topic started by: Eric.Erpelding on 2016-Aug-07

Title: GLBasic generated C++ code
Post by: Eric.Erpelding on 2016-Aug-07
Hello GLBasic Forum.
Is there a way to view the C++ code that is made from the GBAS source code?
Title: Re: GLBasic generated C++ code
Post by: Eric.Erpelding on 2016-Aug-07
In the GLBasic IDE if one goes to "Tools>>Options" one finds:

System
Path for temporary files
C:\Users\<User Name>\AppData\Local\Temp\

Could this be the folder where GLBasic places the intermediate C++ files that it produces?


Title: Re: GLBasic generated C++ code
Post by: dreamerman on 2016-Aug-07
Yes in that directory you can find c++ sources, full path would be: 'x:\Users\<user>\AppData\Local\Temp\glbasic\'
Files are named sequentially:
gpc_temp0.cpp - main source file
gpc_temp1.cpp - first additional source
and so on.. also few additional header files (*.h) are generated.
Title: Re: GLBasic generated C++ code
Post by: Eric.Erpelding on 2016-Aug-07
Thank you dreamerman.

The computer scientist Dennis Ritchie wrote "The language [C] is also widely used as an intermediate representation (essentially, as a portable assembly language) for a wide variety of compilers..."

GLBasic uses the language C++ as an intermediate representation language, and one could refer to C++ as a sort of "portable assembler", although perhaps "portable compiler" would be more accurate due to the high-level nature of the C++ language.