Re: turbo pascal question




"Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx> wrote in message
news:43a86d58$1$11066$e4fe514c@xxxxxxxxxxxxxxxxx

> As originally designed, Pascal only allowed functions to return
> values that could fit in a register. Integers, pointers, but not
> records or arrays. This rule was later relaxed by individual
> compilers that returned values on the stack if necessary.

I hadn't realized that it was a Pascal limitation. On reading your post I
dug out my Pascal User Manual and Report. Sure enough, on page 78 of the
User Manual it says "The result type must be a scalar, subrange, or pointer
type."

> Pascal is riddled with such premature optimisation. Most of it
> is firmly obsolete.

Very true.


.


Quantcast