Shop OBEX P1 Docs P2 Docs Learn Events
QBasic for PropGCC ? — Parallax Forums

QBasic for PropGCC ?

RaymanRayman Posts: 14,826
edited 2012-09-06 10:56 in Propeller 1
This might be an interesting way to do Basic with GCC...
Was just looking at this QBasic fan site:
http://www.qb64.net/forum/index.php?topic=568.0

Their QBasic "compiler" appears to actually just convert QBasic source code into C++.
It then uses GCC to compile and run that C++ code.

I'm not 100% sure it's worth reviving QBasic for Propeller,
but it looks like one could do it if they wanted to...

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-09-06 06:47
    Not crazy at all. You get a fully featured IDE which is nifty. Any chance of doing a "hello world"?

    If this works you might need to get Humanoido to add this to the language list *grin*.
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-09-06 08:39
    Dr_Acula wrote: »
    If this works you might need to get Humanoido to add this to the language list *grin*.
    A quick internet search shows that there are translators to C/C++ for Pascal, Fortran, COBOL, Java, Python, QBasic ASM68XX and Prolog. So all of those could be added to Humanoido's list, if they're not already there. There are also translators to go from C to C++ and C++ to C. The C++ to C translator might be useful for Catalina.

    I used to program in Ratfor, and I'm not sure if there's a Ratfor-to-C translator, but it should be possible to translate Ratfor to Fortran, and then Fortran to C. Using a dual-conversion approach you might be able to convert almost any language to C/C++ by first converting to Pascal, Fortran, COBOL, etc., and then converting to C/C++.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-09-06 09:10
    If I program my robot in COBOL, will it need to wear a suit and tie?
  • RsadeikaRsadeika Posts: 3,837
    edited 2012-09-06 09:20
    If I program my robot in FORTRAN, will it need to wear glasses and a bookkeepers apron?
  • jazzedjazzed Posts: 11,803
    edited 2012-09-06 09:40
    Rsadeika wrote: »
    If I program my robot in FORTRAN, will it need to wear glasses and a bookkeepers apron?

    What? No pocket protector?
    LOL :)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-09-06 09:46
    Did someone say the word BASIC?!? (Suddenly at attention..)

    OBC
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-09-06 09:47
    Jeff, you don't need to be POKEd very hard before you take a PEEK!
  • ersmithersmith Posts: 6,095
    edited 2012-09-06 10:56
    Dave Hein wrote: »
    I used to program in Ratfor, and I'm not sure if there's a Ratfor-to-C translator, but it should be possible to translate Ratfor to Fortran, and then Fortran to C. Using a dual-conversion approach you might be able to convert almost any language to C/C++ by first converting to Pascal, Fortran, COBOL, etc., and then converting to C/C++.

    GNU Fortran actually works (you just have to unpack the sources to the PropGCC tree, and I think add one minor tweak to a configuration file, and then rebuild PropGCC). I have successfully run a Fortran "hello world". The runtime libraries are enormous, though, so the only memory models that work are XMM and XMMC. It's not very practical at the moment :-(.
Sign In or Register to comment.