Re: [fpc-pascal] String error on Windows
Am 31.10.2021 um 12:20 schrieb Ryan Joseph via fpc-pascal: On Oct 31, 2021, at 2:53 PM, Jonas Maebe via fpc-pascal wrote: The compiler itself does enable them by the default on any platform. However, the fpc.cfg file that gets installed with FPC on all platforms does enable them by default (it contains -Sgic). Compile with -vt and check where the compiler is getting its configuration file from. Thanks, I see -Sc now but I've always taken for granted it was always there. What confused me is that it's a command line option instead of a mode switch like other language features. It's simply a separate directive: $COperators. The advantage of having it (and some others) separate is that any mode directive in the source will reset any modeswitches that were set on the command line. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] String error on Windows
> On Oct 31, 2021, at 2:53 PM, Jonas Maebe via fpc-pascal > wrote: > > The compiler itself does enable them by the default on any platform. However, > the fpc.cfg file that gets installed with FPC on all platforms does enable > them by default (it contains -Sgic). Compile with -vt and check where the > compiler is getting its configuration file from. Thanks, I see -Sc now but I've always taken for granted it was always there. What confused me is that it's a command line option instead of a mode switch like other language features. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] String error on Windows
Jonas Maebe via fpc-pascal schrieb am So., 31. Okt. 2021, 08:54: > On 31/10/2021 05:35, Ryan Joseph via fpc-pascal wrote: > > I thought they were behind a mode switch called "c operators" or > something but either way I don't see why Windows would disable them. > > The compiler itself does enable them by the default on any platform. Jonas means "does NOT enable" here. > However, the fpc.cfg file that gets installed with FPC on all platforms > does enable them by default (it contains -Sgic). Compile with -vt and > check where the compiler is getting its configuration file from. > Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] String error on Windows
On 31/10/2021 05:35, Ryan Joseph via fpc-pascal wrote: I thought they were behind a mode switch called "c operators" or something but either way I don't see why Windows would disable them. The compiler itself does enable them by the default on any platform. However, the fpc.cfg file that gets installed with FPC on all platforms does enable them by default (it contains -Sgic). Compile with -vt and check where the compiler is getting its configuration file from. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] String error on Windows
> On Oct 31, 2021, at 10:50 AM, Alexander Grotewohl via fpc-pascal > wrote: > > Because += is a mistake and hopefully it's irreparably broken. > > Does using just s:=s+';'; work? > I thought they were behind a mode switch called "c operators" or something but either way I don't see why Windows would disable them. They're all over my program which runs on macOS and I don't want to remove them (like that operator myself). Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] String error on Windows
Because += is a mistake and hopefully it's irreparably broken. Does using just s:=s+';'; work? -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of Hairy Pixels via fpc-pascal Sent: Saturday, October 30, 2021 11:09:49 PM To: FPC-Pascal users discussions Cc: Hairy Pixels Subject: [fpc-pascal] String error on Windows Why isn't this syntax valid on Windows? Very confused. {$mode objfpc} program WindowsTest; var s: String; begin s += ';';// Syntax error, ";" expected but "const char" found end. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] String error on Windows
Why isn't this syntax valid on Windows? Very confused. {$mode objfpc} program WindowsTest; var s: String; begin s += ';';// Syntax error, ";" expected but "const char" found end. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal