Sign in Join

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

Mailing lists / fpc-devel / 2023-06

BUG REPORT: Fail to compile when using the out keyword instead of var

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt
to Dylan Lamb
Dylan Lamb wrote
[image: fpcbug.png]

This is not a bug. You're using mode fpc, in which the "out" keyword is not supported. You have 3 possibilities to activate this:

Use mode objfpc:

{$mode objfpc}

Use mode delphi:

{$mode delphi}

or enable the use of out in mode fpc:

{$modeswitch out}

Michael.

Reply by email

Tomas Hajny
to Michael Van Canneyt
Michael Van Canneyt wrote 8 lines
On Sun, 18 Jun 2023, Dylan Lamb via fpc-devel wrote: > [image: fpcbug.png] > This is not a bug. You're using mode fpc, in which the "out" keyword is not supported. You have 3 possibilities to activate this:

.
.

One additional minor comment to the original e-mail - in general, it's better to send sample code as text rather than a screenshot, because the text version allows reproducing your situation and proposing alternative versions more easily, whereas the screenshot requires retyping your test program. Obviously, copying the compiler output as simple text is possible as well, but that isn't that important here (it would decrease the size of your e-mail, which might still make sense in case of a message sent to hundreds of people via the mailing list, but the size wasn't that big measured by today's e-mail "standards").

Tomas

Reply by email

Dylan Lamb
to Tomas Hajny

I was smashing my head in the keyboard yesterday trying to figure out what was wrong. I searched a lot online but hadn't found a solution to my issue. I've never had to report a problem I faced through a mailing list so I appreciate the fast response and kind reply. Thank you very much for your time! 😆

Em seg, 19 de jun de 2023 05:04, Tomas Hajny via fpc-devel <

Show quoted text 29 lines
escreveu: On 2023-06-19 09:25, Michael Van Canneyt via fpc-devel wrote: > On Sun, 18 Jun 2023, Dylan Lamb via fpc-devel wrote: > >> [image: fpcbug.png] >> > > This is not a bug. You're using mode fpc, in which the "out" keyword is > not > supported. You have 3 possibilities to activate this: . . One additional minor comment to the original e-mail - in general, it's better to send sample code as text rather than a screenshot, because the text version allows reproducing your situation and proposing alternative versions more easily, whereas the screenshot requires retyping your test program. Obviously, copying the compiler output as simple text is possible as well, but that isn't that important here (it would decrease the size of your e-mail, which might still make sense in case of a message sent to hundreds of people via the mailing list, but the size wasn't that big measured by today's e-mail "standards"). Tomas _______________________________________________ fpc-devel maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email