Sign in Join

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

Mailing lists / fpc-devel / 2010-08

Is -Sx supposed to be equivalent to {$modeswitch exceptions}?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Bruce Bauman

The compiler help message says that -Sx "Enables exception keywords", but if I use -Sx along with a try/except block I get:

Error: identifier not found "try"

If I instead use {$modeswitch exceptions} it works fine. (I'm compiling in FPC mode).

Is this the expected behavior?

Thanks.

-- Bruce
CONFIDENTIALITY NOTICE: This e-mail is confidential and intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please delete it from your computer and contact the sender.

Reply by email

Jonas Maebe
to Bruce Bauman
Bruce Bauman wrote 9 lines
The compiler help message says that -Sx "Enables exception keywords", but if I use -Sx along with a try/except block I get: Error: identifier not found "try" If I instead use {$modeswitch exceptions} it works fine. (I'm compiling in FPC mode). Is this the expected behavior?

You probably have a {$mode xxx} statement in the source code. Changing the syntax mode resets all modeswitches to the default for that syntax mode (changing the syntax mode to a large extent consists of enabling/disabling a bunch of modeswitches).

Jonas

Reply by email