Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Visual Basic 6 Course HELP!!


Reply
 
Thread Tools Display Modes
  #1  
Old 07-10-2002, 05:49 AM
Nicola1664
Guest
 
Posts: n/a
Default Visual Basic 6 Course HELP!!


I am stuck on a question could anybody please help with, the question is:
Give an example of an error you think a compiler might report
Reply With Quote
  #2  
Old 07-10-2002, 06:13 AM
Garrett Sever's Avatar
Garrett Sever Garrett Sever is offline
Strange Brewer

Retired Moderator
* Guru *
 
Join Date: Jun 2001
Location: AddressOf Insomnia
Posts: 2,815
Post

Bad syntax.
__________________
"The lights below
You know they'll bleed forever
Get back as the cores blow
Let me fall..." - Dismantled, "Cornered"
Reply With Quote
  #3  
Old 07-10-2002, 06:22 AM
Squirm's Avatar
Squirm Squirm is offline
Political Coder

Retired Moderator
* Guru *
 
Join Date: Mar 2001
Location: London, England
Posts: 8,037
Default

You need to learn the difference between compile-time and run-time errors.

Run-time errors are errors which happen at run time (no really). That is, they may be caused by the contents of a variable, which the compiler cannot possibly predict. Such an error might be 'Overflow', 'Out of memory', or 'Division by zero'

Compile-time errors are more obvious errors in the code where something blatantly illegal is happening. Such an error might be 'Type mismatch', 'Syntax error' or 'Sub or function not defined'
__________________
Search the forums | Use [vb][/vb] tags | Still IRCing
Reply With Quote
  #4  
Old 07-10-2002, 07:43 AM
NorthWind
Guest
 
Posts: n/a
Default

division by zero error...
Reply With Quote
  #5  
Old 07-10-2002, 08:21 AM
Squirm's Avatar
Squirm Squirm is offline
Political Coder

Retired Moderator
* Guru *
 
Join Date: Mar 2001
Location: London, England
Posts: 8,037
Default

A compiler would not report a division by zero error since that is a runtime error.
__________________
Search the forums | Use [vb][/vb] tags | Still IRCing
Reply With Quote
  #6  
Old 07-10-2002, 08:24 AM
davie's Avatar
davie davie is offline
Senior Contributor
 
Join Date: Jun 2002
Location: Mayo, Eire
Posts: 967
Default

undeclared variable
__________________
Davie
If at first you don't succeed; don't bother trying again, just go to the pub!
Why is a person that handles your money called a 'Broker'?
If quizzes are quizzical, what are tests? | Tiocfaidh ar La
Reply With Quote
  #7  
Old 07-10-2002, 08:27 AM
Big Boabby's Avatar
Big Boabby Big Boabby is offline
Junior Contributor
 
Join Date: Apr 2002
Location: Scotland
Posts: 275
Default

expected Expression
__________________
As we sit bousin' at the nappy,
an' gettin fou, o unco happy
Reply With Quote
  #8  
Old 07-10-2002, 01:13 PM
NorthWind
Guest
 
Posts: n/a
Default

it does
while i was making a calculator with vb, it gave the error divisin by zero.
so i wrote an error handle for it.


Quote:
Originally posted by Squirm
A compiler would not report a division by zero error since that is a runtime error.
Reply With Quote
  #9  
Old 07-10-2002, 01:37 PM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

I think what Squirm means is that division by zero errors occur when the program is running, not when it is being compiled.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->