Re: [fpc-pascal] Lazbuild error on Windows

2021-10-30 Thread Ryan Joseph via fpc-pascal


> On Oct 29, 2021, at 2:01 PM, Mattias Gaertner via fpc-pascal 
>  wrote:
> 
> Lazarus uses macros of the form $(LazarusDir) .
> 
> Did you check the fpc path in Lazarus? 
> Tools / Options / Environment

So what happened here is that I as a new user on Windows decided I needed the 
compiler first so I downloaded the most recent version 3.2.2. After that I 
wanted to use lazbuild and some Lazarus libraries so I installed that next. 
Problem was Lazarus uses "fpc" as the compiler path and due to the installation 
order that pointed to the newer version of FPC which wasn't compatible with the 
3.2.0 units compiled in Lazarus.

Maybe Lazarus should by default point to the version of the compiler that comes 
packaged with it? That would eliminate a bunch of the confusion I had and when 
I wanted to change the compiler version I would have had to set it explicitly 
myself and triggered the error but at least then I would know it was because of 
something I did. 

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] String error on Windows

2021-10-30 Thread Hairy Pixels via fpc-pascal
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


Re: [fpc-pascal] String error on Windows

2021-10-30 Thread Alexander Grotewohl via fpc-pascal
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


Re: [fpc-pascal] String error on Windows

2021-10-30 Thread Ryan Joseph via fpc-pascal


> 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