Sign in Join

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

Mailing lists / fpc-pascal / 2007-03

Behavior of SizeOf function

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Luiz Americo Pereira Camara

The result of a SizeOf(Pointer) is know at compile time.

Does fpc optimize it and treat as a constant or will call the SizeOf function every time it appears?

Thanks in advance.

Luiz

Reply by email

Daniël Mantione
to Luiz Americo Pereira Camara

Op Thu, 8 Mar 2007, schreef Luiz Americo Pereira Camara:

The result of a SizeOf(Pointer) is know at compile time. Does fpc optimize it and treat as a constant or will call the SizeOf function every time it appears?

Yes, it treats it as a constant.

Daniël

Reply by email