Re: turbo pascal question



On 2005-12-20, Maarten Wiltink <maarten@xxxxxxxxxxxxxxxxxx> wrote:
>> type laby = array [1..lab_xSize, 1..lab_ySize] of aufbau;
>> function createlab(var aus_x, aus_y : integer) : laby; <--
>
> 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.
>
> Pascal is riddled with such premature optimisation. Most of it
> is firmly obsolete.

In this case I think it is correct, since laby is a fairly large creature.
.



Relevant Pages

  • Pointers to array sections - is this guaranteed to work?
    ... I want to register, for later use, pointers to arrays ... The problem is that these arrays may be larger than what is ... subroutine reg ...
    (comp.lang.fortran)
  • Re: turbo pascal question
    ... > values that could fit in a register. ... Integers, pointers, but not ... > records or arrays. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Array comparison
    ... > Deep and recursive. ... the pointers and comparing their referents instead of comparing the ... >> arrays, then I think you also need to argue against assigning arrays. ... semantics (notably, reference counting). ...
    (alt.comp.lang.borland-delphi)
  • Re: double pointer
    ... Nor is it up to me, Deitel 1, Deitel 2, Schildt, ... that arrays are pointers, or that pointers are arrays, in C++. ...
    (comp.lang.c)
  • Re: Doubt about arrays name
    ... basicly pointers are arrays and arrays are pointers, ... but "int main" is better. ... In this case, for traversing a string, using int can't ...
    (comp.lang.c)