Run-time checking: Difference between revisions
Typographical error correction |
Sam Hocevar (talk | contribs) m spelling |
||
Line 5: | Line 5: | ||
'''''Runtime checking''''' is often critizied for slowing down the resulting program. However this ignores the fact that most compilers for languages with '''''runtime checking''''' allow to switch the checks off when performace is more important. |
'''''Runtime checking''''' is often critizied for slowing down the resulting program. However this ignores the fact that most compilers for languages with '''''runtime checking''''' allow to switch the checks off when performace is more important. |
||
While on the other hand, adding '''''runtime checking''''' to a language, which does not support it |
While on the other hand, adding '''''runtime checking''''' to a language, which does not support it normally, is close to impossible since those languages don't have the needed language constructs. |
||
See [[wikibooks:Programming:Ada:Types:range]] as an example on how runtime checking can be defined in the [[Ada programming language]]. |
See [[wikibooks:Programming:Ada:Types:range]] as an example on how runtime checking can be defined in the [[Ada programming language]]. |
Revision as of 19:08, 28 January 2005
Runtime checking is a mechanism of an programming language to check for errors at runtime, e.g. arithmetic overflows or invalid type casts. Most times an exception is thrown and/or the program is terminated. Instead of ignoring this failure as it is done in C, C++ etc.
Runtime checking is often critizied for slowing down the resulting program. However this ignores the fact that most compilers for languages with runtime checking allow to switch the checks off when performace is more important.
While on the other hand, adding runtime checking to a language, which does not support it normally, is close to impossible since those languages don't have the needed language constructs.
See wikibooks:Programming:Ada:Types:range as an example on how runtime checking can be defined in the Ada programming language.
If you like to know how switching off runtime checks in a programming language which does support them can cost you € 885'000'000.-- then read Ariane 5 Flight 501.