I have a function that tests for a series of different conditions
according to a value in a 'case...of' block.
Result:=false;
mylist:=TStringlist.Create;
case i of
1:
begin
if condition1 then
begin
Result:=true;
break;
end;
if condition2 then
You can do several thins:
1. use Else !!
2. Surround (I hope that the proper spelling) everything in try finally and
then in the finally place the free statement.
3. Make a shorter code:
Result := (condition1) OR (condition2) OR (condition3)
Will be the same as your if statment, but shorter.
On 08/22/2010 10:10 AM, Dave Coventry wrote:
I have a function that tests for a series of different conditions
according to a value in a 'case...of' block.
Result:=false;
mylist:=TStringlist.Create;
case i of
1:
begin
if condition1 then
begin
Result:=true;
You should use Else. But if you insist on break, you can insert a
dummy repeat/until loop:
One more thing, since you are creating a TStringList, it is recommended
to enclose your code anyway in a try/finally block irrespective whether
you use the dummy loop or not. This guarantees the
On Sun, 22 Aug 2010, Dave Coventry wrote:
I have a function that tests for a series of different conditions
according to a value in a 'case...of' block.
Result:=false;
mylist:=TStringlist.Create;
case i of
1:
begin
if condition1 then
begin
Result:=true;
break;
Thanks.
What about updating GUI in main thread, like normally done with
TThread.Synchronize? I tried this:
Item.Thread.Synchronize(Item.Thread, @ShowStatus);
where ShowStatus is part of the class calling the parallel funcs.
It doesn't work -- RunError(210).
Juha
--
Great answers!
Thanks, guys! :)
On 22 August 2010 11:36, Michael Van Canneyt mich...@freepascal.org wrote:
On Sun, 22 Aug 2010, Dave Coventry wrote:
I have a function that tests for a series of different conditions
according to a value in a 'case...of' block.
Result:=false;
Hi all,
Anyone use i18n capabilities in lazarus/fpc multi-threaded server apps? Can you
tell me if there are threading issues that I should be aware of?
Thanks,
--
Warm Regards,
Lee
--
___
Lazarus mailing list
Hello,
I've generated a new help snapshot. (chm files)
The archive still is at
http://www.stack.nl/~marcov/doc-chm.zip
and contains rtl,fcl,lcl ,fpdoc,ref,user,prog.chm
This release benefits from several improvements in the fpdoc generation,
specially links between packages, and links in
Em 22/08/2010 15:26, Marco van de Voort escreveu:
Hello,
I've generated a new help snapshot. (chm files)
The archive still is at
http://www.stack.nl/~marcov/doc-chm.zip
and contains rtl,fcl,lcl ,fpdoc,ref,user,prog.chm
This release benefits from several improvements in the fpdoc
On 22/8/10 7:26, Marco van de Voort wrote:
Hello,
I've generated a new help snapshot. (chm files)
The archive still is at
http://www.stack.nl/~marcov/doc-chm.zip
and contains rtl,fcl,lcl ,fpdoc,ref,user,prog.chm
Thanks for this. The archive contains .xct, but no .kwd files.
Is this an
Small typo in controls.pp, line 1450
TChildControlResizeStyle started with crs like crsScaleChilds but in the
note (comment) it is cesScaleChilds, it is need a review.
Thanks in advance.
--
Zaher Dirkey
--
___
Lazarus mailing list
12 matches
Mail list logo