Your question
Solved

need help with pascal programming

Tags:
  • Pascal
  • Programming
  • Windows 7
Last response: in Apps General Discussion
February 22, 2014 1:36:11 PM

how do i force a pascal program to end?

More about : pascal programming

a c 324 $ Windows 7
a b L Programming
February 22, 2014 2:08:57 PM

It's bad form to force a program to end. The proper way is to let it run off the end of it's main procedure after cleaning up after itself.
m
0
l

Best solution

a b $ Windows 7
a b L Programming
February 23, 2014 1:04:45 AM

Whilst that is good advice, there are times when it can be useful to end a program prematurely. The lack of exception handling in Pascal means that this is sometimes better than constructing a convoluted structure. In C this is handled by the "return" statement; the nearest equivalent in Pascal is the "halt" statement.
Share
Related resources
a b $ Windows 7
a b L Programming
February 23, 2014 8:14:19 AM

Once we start talking about object-oriented programming the design imperatives become very different. My reply related to standard classic Pascal.
m
0
l
Tom’s guide in the world
  • Germany
  • France
  • Italy
  • Ireland
  • UK
Follow Tom’s guide
Subscribe to our newsletter
  • add to twitter
  • add to facebook
  • ajouter un flux RSS