Click to See Complete Forum and Search --> : Interesting idea here
agent
Feb 23rd, 2001, 03:18 AM
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?
parksie
Feb 23rd, 2001, 06:43 AM
There was a C interpreter for RISC OS machines a few years ago, and Beebug C for the BBC partially interpreted (I think).
substring
Feb 23rd, 2001, 07:51 AM
hmm, is that what the CLR is going to do?
substring.
agent
Feb 23rd, 2001, 07:30 PM
so there isn't one for windows?
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.
substring
Feb 25th, 2001, 02:22 AM
CLR is using on the Microsoft .NET framework, and it is of course for Windows.
agent
Feb 25th, 2001, 05:34 PM
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)
substring
Feb 26th, 2001, 08:12 AM
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.
agent
Mar 1st, 2001, 12:32 AM
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.
HarryW
Mar 1st, 2001, 01:03 AM
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.
agent
Mar 2nd, 2001, 12:11 AM
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.
HarryW
Mar 2nd, 2001, 01:21 AM
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.
parksie
Mar 2nd, 2001, 12:26 PM
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++.
HarryW
Mar 3rd, 2001, 02:36 AM
Okiedoke, I get confused between the two since I use them both :rolleyes:
parksie
Mar 3rd, 2001, 07:05 AM
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 :rolleyes:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.