Hi Thomas,
The error is not the file content after "end.".
The error is not having the expected "end;" after "begin".
This works ok:
_
program test;
begin
end;
end.
abc 123
_
Martin.
___
fpc-pasca
I've been using ELSE in IF statements and in CASE statements for 25
years without realising there was a problem. What a dim-wit I have been.
Martin.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailma
On 17/06/2023 19:07, Travis Siegel via fpc-pascal wrote:
This is interesting, because it's the first time I've ever seen "break"
as a valid command in pascal, and I've been using pascal since the
mid/late 80s. All kinds of dialects too, and I've never seen break as a
keyword. C, Python, Perl,
On 14/04/2023 01:31, James Richters via fpc-pascal wrote:
Does anyone know what's up with the Pause key in Windows?
Is there some way to tell if it was pushed?
Hi James,
//
Tform.FormKeyDown(Sender:TObject; var Key:Word; Shift:TShiftState);
begin
if Key=VK_PAUSE
On 12/09/2022 15:37, James Richters via fpc-pascal wrote:
So I could just do this?
Index:= MyStringlist.IndexOfName(SearchName);
If Index >=0 then
MyValue := MyStringlist[Index].ValueFromIndex;
Hi James,
I would probably do
try
with MyStringList do MyValue:=ValueFromIndex[IndexOfN
On 12/09/2022 14:16, James Richters via fpc-pascal wrote:
The problem with the for in loop is that I need the index.
Hi James,
You don't need a loop for that:
index:=MyStringlist.IndexOfName;
see:
https://www.freepascal.org/docs-html/rtl/classes/tstrings.indexofname.html
martin.
On 10/09/2022 17:01, James Richters via fpc-pascal wrote:
For Loop := 0 to MyStringList.Count-1 do
It would be nice to not have the -1
I don't understand what is wrong with Count-1, but you can get the
highest index like this if you wish:
high_index:=Length(Trim(MyStringList.Text))-Length(
On 18/05/2021 20:59, Bo Berglund via fpc-pascal wrote:
I have a pretty sizable console app written with Delphi 15 years ago but ported
to Linux using FreePascal (3.2.0) with Lazarus (2.0.12) as IDE.
I have the same problem with high CPU usage for a 20-year-old Delphi App
compiled in Lazarus(2.