Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Fons <NOfonzzz@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 26 May 2008 13:01:36 +0100
Now we've got the correct comparison. Yours is shorter and yours is checked by the compiler. But: mine is all you got.
Fons.
Fair enough my syntax is still shorter:.
S[0..79] := ' ';
// vs
FillChar(S, SizeOf(S), Ord(' '));
Bye,
Skybuck.
"Fons" <fonzzzNO@xxxxxxxxxxxxxxxxxxx> wrote in message news:4839852d$0$14357$e4fe514c@xxxxxxxxxxxxxxxxxYou must be God Allmighty. Not declaring vByteSorted and not using "begin" and "end".
Fons.
"Fons" <fonzzzNO@xxxxxxxxxxxxxxxxxxx> wrote in message
news:483882ec$0$14346$e4fe514c@xxxxxxxxxxxxxxxxx
Sometimes FillChar will do:Your 4 code lines, versus my 1 code line.
var S : array[0..79] of char;
begin
{ Set to all spaces }
FillChar(S, SizeOf(S), Ord(' '));
end;
My one line is 75% more efficient than yours =D
Bye, Bye,
Skybuck ;)
One could simply write:
vByteSorted[0..255] := false;
Would be nice ! :)
Bye,
Skybuck.
- References:
- Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Skybuck Flying
- Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Fons
- Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Skybuck Flying
- Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Fons
- Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Skybuck Flying
- Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- Prev by Date: Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- Next by Date: Auto cleanup of dynamic array of Trecord.DynamicArray when first is nilled ?
- Previous by thread: Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- Next by thread: Editor could work better with multi-line parameter alignment.
- Index(es):
Relevant Pages
|