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

1654 views

Celenite

1199 views

Im back...again!

1047 views

Tunnel Syndrome

1323 views

Borderlands

1227 views

First Flash Game

1020 views

First Flash Game

1316 views

Bullet holes? Yum!

1130 views

Game 2

1079 views

New Project

937 views
Advertisement