Re: turbo pascal question
- From: "Bruce Roberts" <dontsendtober@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Dec 2005 14:42:44 -0500
"Oliver Bleckmann" <Oliver-Bleckmann@xxxxxxxxxx> wrote in message
news:do9i03$ko6$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> my brother asked me about this, now I ask you.
> This should work for FreePascal, but not for Borland Pascal 6.0 or 7.0 -
> WHY?
IIRC BP function results were either passed back in registers, an fpu
register, or as a double word stack entry (in the case of strings). While I
haven't found an explicit explanation, I would expect that neither records
or array types could be used as function result types. I wouldn't be
surprised if sets, at least those with a base type of cardinality > 32,
were also disallowed.
> Any suggestions or workarounds?
Add a Var parameter of the appropriate type and turn the function into a
procedure. Or, as another poster suggested return a pointer type.
.
- Follow-Ups:
- Re: turbo pascal question
- From: Femme Verbeek
- Re: turbo pascal question
- From: Marco van de Voort
- Re: turbo pascal question
- References:
- turbo pascal question
- From: Oliver Bleckmann
- turbo pascal question
- Prev by Date: Re: How I dramatically sped up DB file updating
- Next by Date: Re: turbo pascal question
- Previous by thread: turbo pascal question
- Next by thread: Re: turbo pascal question
- Index(es):
Relevant Pages
|