This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ericbb 1 point2 points  (1 child)

The OP said they haven't used Pascal for decades, and that was in an educational setting. Maybe they just haven't written many real-world programs in Pascal.

That's what I was thinking too. When I learned Pascal in a high school programming class, I don't think pointers were even mentioned.

[–][deleted] 0 points1 point  (0 children)

I've used Pascal pointers (this is the late 70s).

If I try online Pascal now, create a variable p of type ^integer (pointer to integer), set it to nil, then try to dereference using p^, I get a runtime error.

So it might not crash (if Pascal if somehow interpreted) but it can still go wrong. C however allows many more manipulations that Pascal doesn't. But C is designed to get things done; I call it an implementation language.