Results 1 to 15 of 15

Thread: Interesting idea here

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    Keeping in mind that BASIC and Visual Basic both do this, I was wondering if there is, or if anybody has ever attemted to write, a c or c++ interpreter (as opposed to compiler).

    If there is such a thing (for Windows), any ideas on where I can get it?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    There was a C interpreter for RISC OS machines a few years ago, and Beebug C for the BBC partially interpreted (I think).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Addicted Member substring's Avatar
    Join Date
    Feb 2001
    Posts
    148

    Smile

    hmm, is that what the CLR is going to do?

    substring.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    so there isn't one for windows?

  5. #5
    Guest
    Turning C++ into a interprated language would defeat the whole purpous for writting in C++. It would be like programming in VB with C++ syntax.

  6. #6
    Addicted Member substring's Avatar
    Join Date
    Feb 2001
    Posts
    148

    Smile

    CLR is using on the Microsoft .NET framework, and it is of course for Windows.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    Originally posted by ChimpFace9000
    Turning C++ into a interprated language would defeat the whole purpous for writting in C++. It would be like programming in VB with C++ syntax.
    I guess. But I'm used to fully debugging my code before I compile. (As you can tell, I'm switching from VB)

  8. #8
    Addicted Member substring's Avatar
    Join Date
    Feb 2001
    Posts
    148

    Smile

    Keep in mind that a program that compiles does not mean it is bug free. It only mean that you are syntactically correct, that's all. Your program might still not run. And it is the same in VB. The Ctrl-F5 only check your syntax and not your logic. So it is not really debugging.

    Hope this helps.

    substring.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    well actually what i'm looking for is a program that has an immediate window and a step-debugger (like what vb has) so i can test a single subroutine without having to compile thousands of lines. (what a dream...) When vb interprets a program, there is about a one second wait before the program runs. With most c++ compilers i've used, the wait is much longer.

  10. #10
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    It will only compile anything that's changed since last time it was compiled. If you're making minor chages and having to wait ages for compilation, you could try splitting a section of code off into another source file. That way only the file with the new code will be recompiled. Well there is still linking and stuff to be done but it will be quicker.

    VC++ has a debugger, but I think you already knew that.
    Harry.

    "From one thing, know ten thousand things."

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    acually, i don't know how good of a debugger vc++ has. I'm a vb user thinking of transitioning to vc++ and am looking for the simplest route. Don;t get me wrong, I WILL be switching to c++, I just don't know how easy it will be for me.

  12. #12
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Well you can debug your code using VC++ (I have version 6, can't say anything about the previous versions) in much the same way as you can in VB. You can set breakpoints and watch values, including complex structures. I think you have to use the 'Go' option (F5) rather than the 'Execute' option (Ctrl-F5) to use the debugger, I guess it will interpret the code if you do that. Well you can debug pretty easily anyway.

    I used to use VB until about a year ago, when I started to learn C and C++. I have learnt some of both C and C++ because I was learning C++ in my spare time but at university one of the programming languages they taught was straight C, so I know both, more or less. I'm by no means an expert but I am comfortable in C++, and I quite rarely see something I've never come across before. I made the transition mainly because I am interested in games programming, and C++ is the language of choice for that (along with maybe Delphi, but I don't like Pascal syntax much).

    Give it a shot, you'll probably run into a few problems since C/C++ is a lower level language and there are some new concepts like pointers, references and operator overloading (the latter two C++ only) but stick with it and I think you'll like it.

    I hardly ever use VB anymore, except to help people out on this forum.
    Harry.

    "From one thing, know ten thousand things."

  13. #13
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The VC++ debugger still compiles the code, but keeps track of which instructions correspond to which line of code, and suspends the thread as necessary.

    C also has references, it's not just C++.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Okiedoke, I get confused between the two since I use them both
    Harry.

    "From one thing, know ten thousand things."

  15. #15
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No problem...I was doing some C code and thought it was okay...I'd forgotten you need to declare variables at the start AAAAARRRRRGGGGHHHHHH
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width