?
Solved

getting VB6 compiler to show all errors - not just one

Posted on 2005-04-04
21
Medium Priority
?
828 Views
Last Modified: 2012-05-05
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...
0
Comment
Question by:kenshaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +4
21 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 13700328
None that I am aware of.  -Jim
0
 
LVL 4

Expert Comment

by:Prestaul
ID: 13700397
You stated that perfectly:  "You have to compile, fix, compile, fix, compile, fix etc etc"
0
 
LVL 4

Author Comment

by:kenshaw
ID: 13700425
are there any other vb6 compilers out there?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 37

Expert Comment

by:Harisha M G
ID: 13700434
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
0
 
LVL 4

Expert Comment

by:Prestaul
ID: 13700439
You could look at PowerBasic...  Strictly speaking it is not VB but almost exactly the same syntax.
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 13700572
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.
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 13700591
0
 
LVL 32

Expert Comment

by:Erick37
ID: 13700777
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.

0
 
LVL 15

Expert Comment

by:ameba
ID: 13702491
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++.
0
 
LVL 15

Expert Comment

by:ameba
ID: 14053603
Why are you giving C grade to everyone?
0
 
LVL 4

Expert Comment

by:Prestaul
ID: 14131702
If you give a 'C' grade then you are calling his answer crap...  Take a look at the documentation.

http://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'.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 14131824
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
0
 
LVL 4

Author Comment

by:kenshaw
ID: 14131922
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.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 14131956
>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.
0
 
LVL 4

Author Comment

by:kenshaw
ID: 14132056
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.
0
 
LVL 15

Expert Comment

by:ameba
ID: 14132735
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).
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 14365940
>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.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 14365941
Can you spell it out/provide a URL in this question?
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14402906
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question