Oxygen Basic

Information => Development => Topic started by: JRS on August 18, 2018, 08:21:13 PM

Title: PB / FB Include Converter
Post by: JRS on August 18, 2018, 08:21:13 PM
Charles,

How compatible is Oxygen Basic include file syntax compared to PowerBasic and FreeBasic? Could one create a translator to do most of the work?

Since O2 can read C header files, would it make sense to extend that functionality and allow them to be converted into O2 include files BASIC programmers would be more comfortable with?
Title: Re: PB / FB Include Converter
Post by: Charles Pegge on August 19, 2018, 05:42:33 AM
Hi John,

o2 can read PB/FreeBasic/VBasic equates, types and declares. It does not support object declarations in PB9.. or Freebasic, however.

There are some differences which are quite easy to resolve. For instance PowerBasic INT is a 16 bit signed integer (a legacy from pre-Prentium times).

In o2 we could solve this by redefining int before using PB headers:

undef int
typedef short int
Title: Re: PB / FB Include Converter
Post by: JRS on August 19, 2018, 07:56:31 AM
That's great news Charles.

Instead of converting PowerBASIC code to O2, create PB DLLs and call the code using PB includes from O2. Makes sense to me. It doesn't solve the 64 bit problem but does give the PB programmer a future with a BASIC compiler that is open source and developed by a brilliant author. It doesn't get much better.

If O2 could create OCX controls as easy as it does DLLs, Oxygen Basic would be hard to beat.

Using IUP as a DDT alternative could get a PB programmer running on O2 with minimal effort.