Still Spring Break

posted in The Broken Mind
Published March 13, 2009
Advertisement
BASIC to C++ Compiler


Input BASIC Code:
LET x = 39 * 2PRINT "Hello, World!", 50+1, xIF 5+5 > 123 THEN PRINT "Testing"INPUT x, a, b


Output C++ Code:
//Begin Intro Segment#include #include using namespace std;int main(){//End Intro Segment//Begin Variable Segmentint x = 0; int a = 0; int b = 0;//End Variable Segment//Begin Generated Code Segmentx = 39 * 2;cout << "Hello, World!" << 50+1 << x;if(5+5 > 123){ cout << "Testing";}cin >> x >> a >> b;//End Generated Code Segmentreturn 0;}


Previous Entry Spring Break
0 likes 1 comments

Comments

benryves
Hurrah for BASIC. [smile] This looks like an interesting project.

With regard to your last entry on implicit conversions, I agree that implicit narrowing conversions (float to int) and lack of a proper Boolean type aren't great, but I don't see the problem with implicit widening conversions (int to float). I rather like the way C#/.NET handles this, with the ability to declare both implicit and explicit conversion operators.
March 13, 2009 11:43 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

26 Games 26 Weeks

1614 views

Celenite

1164 views

Im back...again!

1011 views

Tunnel Syndrome

1277 views

Borderlands

1188 views

First Flash Game

984 views

First Flash Game

1282 views

Bullet holes? Yum!

1095 views

Game 2

1045 views

New Project

902 views
Advertisement