Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-11

Three little pig... uh, questions :-)

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sebastian Schuberth

Hi there!

1. Isn't FPC able of the standard pascal calling convention (pushing parameters left-to-right, function removes parameters)?

2. When will parameter passing in registers be available?

3. Do I need to tell FPC which registers will be modified by an assembler function in an external object file? How do I tell it FPC (the doc only covers this for internal asm functions)?

Sebastian Schuberth
Jonas Maebe
1. Isn't FPC able of the standard pascal calling convention (pushing parameters left-to-right, function removes parameters)?

Use the "stdcall" modifier.

2. When will parameter passing in registers be available?

Don't know yet.

3. Do I need to tell FPC which registers will be modified by an assembler function in an external object file? How do I tell it FPC (the doc only covers this for internal asm functions)?

I don't think you can tell FPC that. It will simply assume all registers are modified by such a function.

Jonas

Pierre Muller
to Jonas Maebe

At 15:07 23/11/00 , vous avez écrit:

>1. Isn't FPC able of the standard pascal calling convention (pushing >parameters left-to-right, function removes parameters)? Use the "stdcall" modifier.

No, this doesn't change the order of pushing parameters, it only changes the way the parameters are removed from stack (by ret $NN in the procedure/function)
as opposed to the cdecl modifier where the args are removed from stack after the return by the code that called the function.

The is a "pascal;" modifier, but it is allmost completely untested. Check if it works.

Mattias Gaertner
to Florian Klaempfl

Hi,

The function typinfo.GetPropList is incompatible to the Delphi function. To get the number of results, you can't ask the function itself, because it writes to list in any case. Even if there is no list. Delphis function tests, if the list exists.
Is this a bug or a feature?

Mattias

Mattias Gaertner
to Florian Klaempfl: At least never for 1.0.x. Maybe for 1.1/1.2. But the point is that register parameters…

Hi again,

1.
I want access to set elements via the RTTI.
Delphis sysutils.pas defines for a set with the size of an integer:

  TIntegerSet = set of 0..SizeOf(Integer) * 8 - 1;

Then you can write:

  S:TIntegerSet;
  [...]
  Integer(S) := GetOrdProp(Instance, PropInfo);
  V := FElement in S;

How can I achieve this under FPC?
Can I simply take the TIntegerSet?

2.
How much digits the following floats have?
ftSingle,ftDouble,ftExtended,ftComp,ftCurr,ftFixed16,ftFixed32

Mattias