Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- From: Fons <fonzzzNO@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 24 May 2008 23:05:42 +0100
Sometimes FillChar will do:
var S : array[0..79] of char;
begin
{ Set to all spaces }
FillChar(S, SizeOf(S), Ord(' '));
end;
Fons.
Hello,.
This could be a nice syntax additional to Delphi:
Instead of writing:
var
vIndex : integer;
for vIndex := 0 to 255 do
begin
vByteSorted[0..255] := false;
end;
Or instead of writing:
for each in vByteSorted do
begin
vByteSorted := false;
end;
One could simply write:
vByteSorted[0..255] := false;
Would be nice ! :)
Bye,
Skybuck.
- Follow-Ups:
- References:
- Prev by Date: Websites That EXPLODE Your Sales
- Next by Date: Feature Request: Debugger should remember last return value of functions
- Previous by thread: Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- Next by thread: Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
- Index(es):
Relevant Pages
|