 |

07-10-2002, 05:49 AM
|
|
|
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
|
|

07-10-2002, 06:13 AM
|
 |
Strange Brewer
Retired Moderator * Guru *
|
|
Join Date: Jun 2001
Location: AddressOf Insomnia
Posts: 2,815
|
|
__________________
"The lights below
You know they'll bleed forever
Get back as the cores blow
Let me fall..." - Dismantled, "Cornered"
|

07-10-2002, 06:22 AM
|
 |
Political Coder
Retired Moderator * Guru *
|
|
Join Date: Mar 2001
Location: London, England
Posts: 8,037
|
|
|
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'
|
|

07-10-2002, 07:43 AM
|
|
|
|
division by zero error...
|
|

07-10-2002, 08:21 AM
|
 |
Political Coder
Retired Moderator * Guru *
|
|
Join Date: Mar 2001
Location: London, England
Posts: 8,037
|
|
|
A compiler would not report a division by zero error since that is a runtime error.
|
|

07-10-2002, 08:24 AM
|
 |
Senior Contributor
|
|
Join Date: Jun 2002
Location: Mayo, Eire
Posts: 967
|
|
__________________
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
|

07-10-2002, 08:27 AM
|
 |
Junior Contributor
|
|
Join Date: Apr 2002
Location: Scotland
Posts: 275
|
|
__________________
As we sit bousin' at the nappy,
an' gettin fou, o unco happy
|

07-10-2002, 01:13 PM
|
|
|
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.
|
|
|

07-10-2002, 01:37 PM
|
 |
Code Meister
Retired Moderator * Guru *
|
|
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
|
|
|
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
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|