Is there B+ to Max Converter?

BlitzPlus Forums/BlitzPlus Programming/Is there B+ to Max Converter?

Mainsworthy(Posted 2011) [#1]
I've just successfully ported B+ code to Max

http://www.4shared.com/file/DqNQcmG2/WarTactical62.html
http://www.mediafire.com/file/xnl5de1i75b8b83/WarTactical62.zip

It was a lot of repetition to get it converted, but not too complicated, but My programing isnt probably complex structure and so-on, but I would love a B+ to Max & a Max to B+ converter? is there one out there?

Last edited 2011


Stamm(Posted 2011) [#2]
A *perfect* B+ to BM converter is possible since BM can do things B+ can't and BM can do everything B+ can, but the inverse is not true. BMax is (basic) OOP, while Blitz is still procedural.


Yasha(Posted 2011) [#3]
A B+ to BMax converter has to solve three main problems:

-- namespace collision: BlitzMax only has the one namespace for functions, types and variables
-- scoping differences: Max has some (slightly inconsistent) different scoping rules from B+, and variable declarations may need to be moved to get the same behaviour (this is likely to be an edge case... just don't declare variables in the middle of your code)
-- keyword collision: any variables named "Abstract", "Method", "Private" etc. will collide with new keywords introduced by the OOP extensions

At the end of the day these aren't a big deal, and a converter could probably get away with ignoring them, or issuing a warning.

A BMax to B+ converter would effectively have to be a full compiler, because BlitzPlus doesn't have enough features to replicate BlitzMax's behaviour without a lot of helper code to simulate function pointers and so on, and the end result would be very slow by comparison.


skidracer(Posted 2011) [#4]
You mean like when you go File->Import BB Project in BlitzMax?