Link to home
Start Free TrialLog in
Avatar of kenshaw
kenshaw

asked on

getting VB6 compiler to show all errors - not just one

With the vb6 compiler - the default behavior is that when it encounters a compile error - it exits the compile process.

the problem with that is - if you've got 30 bugs - you have to compile, fix, compile, fix, compile, fix etc etc

I'm a C programmer - and in C - if there are 30 bugs - you can tell the compiler to continue compiling and report all the errors at the end.  Eg. lets say i change the name of a variable - it'll tell me all of the subsequent lines the old nonexistant variable name is used.

Is there a way of getting the vb6 compiler to behave like this?  or do i have to put up with compile, fix, compile, fix...
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

None that I am aware of.  -Jim
Avatar of Prestaul
Prestaul

You stated that perfectly:  "You have to compile, fix, compile, fix, compile, fix etc etc"
Avatar of kenshaw

ASKER

are there any other vb6 compilers out there?
Hi kenshaw,
   
You might be knowing an interpreter...

C/C++ use Compilers while VB uses Interpreter.

The only difference between compilers and interpreters is that the compiler will go through the whole code at once and reports all the errors. But the interpreter will scan one line at a time, compiles it and executes it if no error is found.

Bye
---
Harish
You could look at PowerBasic...  Strictly speaking it is not VB but almost exactly the same syntax.
kenshaw,

Interpreter
___________
A program that reads source code one statement at a time, translates that statement to machine language, executes the machine language statement, then continues with the next statement. BASIC is sometimes interpreted and sometimes compiled. Although less convenient for programming, compilers are much faster than interpreters.

A high-level language translator that converts individual high-level computer language program instructions (source code) into machine instructions. It translates and executes each statement line-by-line during the running of the program.

Compiler
________
A software program that converts (translates) a complete software program written in high-level language SOURCE CODE (such as PASCAL or FORTRAN) into machine language. The entire source code is edited, compiled, and run at one time as compared to an INTERPRETER that is run one line at a time.

A program that reads source code, translates it into machine language, and writes the machine language to binary (object) code that can be directly loaded and executed.
In the Tools->Options... menu you have these options which makes bugs harder to find their way into your program:

[Editor tab] Check "Require Variable Declaration"
    This will force you to declare all variables before using them
[General tab] UnCheck "Compile on Demand"
    This will perform a full compile before running the application

Syntax errors are highlighted in red, so these kinds of errors do not make it to compile time.

In VB, you shouldn't use "Make EXE", use Ctrl+F5 (start with full compile) it doesn't make .obj files or link them, it is fast, and it goes directly to error.
After compiler finds the error:
- you can stop the application, correct the error and press Ctrl+F5 again to go to next error
- you can go to Break mode, correct the error and continue without starting compile again -  it's so called "Run - Edit - Continue" process; its productivity is much better than listing 30 errors (and clicking them).

VB6 uses the same optimizing compiler as C++.
Why are you giving C grade to everyone?
If you give a 'C' grade then you are calling his answer crap...  Take a look at the documentation.

https://www.experts-exchange.com/help.jsp#hi73

You should never give a 'C' grade without first asking for more clarification, and you should explain why you think the answer is only worth a 'C'.
Agreed.  The experts above provided answers that were technically correct to the question asked.  

The fact that it was not the solution that was asked for (namely, 'There isn't a way to do this for VB') should not be a factor in assigning a grade.

Awarding 'C' grades is usually motivation for experts not to respond to an asker's future questions.

Just my .02./experience.
-Jim
Avatar of kenshaw

ASKER

The answer doesn't answer the question.

Also - the information was factually incorrect - there are vb compilers out there.

I am happy to give higher grades in future - but don't flame me just because you don't agree with the way i've categorised this answer.
>there are vb compilers out there.
Can you list them in this question?  The answer you accepted doesn't appear to address the original 'getting VB6 compiler to show all errors' question.
Avatar of kenshaw

ASKER

the answer gave me the best short-term solution.  None of the answers answered the question.  One of my staff found a compiler - i'll get him to tell me what it is - but to be honest - this isn't exactly a high priority.
kenshaw,
> The answer doesn't answer the question.
> None of the answers answered the question.

I'll ask CS to remove points and grade.  If you are not happy with the answer, you don't have to accept it or award points.

Showing more than one error is possible, but very complicated and non-productive (for the stated reason - fixing the errors in IDE).
>One of my staff found a compiler - i'll get him to tell me what it is -
For reasons besides general amusement, I'd be interested in what your staff found.
Can you spell it out/provide a URL in this question?
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial