Sign in Join

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

Mailing lists / fpc-pascal / 2014-10

section keyword

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner

Hi,

I didn't find it in the reference.

How does the section keyword work and where is it allowed?

const
  devcfg3: longWord = 3; section '.devcfg3';

Mattias

Jonas Maebe
to Mattias Gaertner
Mattias Gaertner wrote
I didn't find it in the reference.

It's a trunk feature, so it's not yet documented.

How does the section keyword work and where is it allowed? const devcfg3: longWord = 3; section '.devcfg3';

It's allowed after non-external global variables and typed constants. It puts the data for that variable in the section with the name follows the directive. It's only allowed for embedded targets.

Jonas