Re: Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;



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.


.



Relevant Pages

  • Interesting shortcut syntax for filling arrays with common value: vByteSorted[0..255] := false;
    ... This could be a nice syntax additional to Delphi: ... for vIndex:= 0 to 255 do ... Or instead of writing: ...
    (alt.comp.lang.borland-delphi)
  • Re: GAS struc
    ... And you've rewritten the Delphi VCL, ... > As you readily tell everyone around here, you're just a beginner. ... > Because I am right now writing a component library in assembly? ... Using equates is *not* the way to do structs. ...
    (alt.lang.asm)
  • Re: Betovs notation
    ... The ony case when RosAsm makes a difference on ... In a coherent syntax, each special Char should have, ... Plus, with some personal writing style, pushing the ... famous "Line-Oriented Assemblers" vs "non...". ...
    (alt.lang.asm)
  • Re: Great SWT Program
    ... (and has a command to toggle display of markup, ... unlike Java's for and while syntax. ... Writing a script to strip the ... prose in a very artificially consistent sort of way, ...
    (comp.lang.java.programmer)
  • Re: Why Johnny Cant Write
    ... WRITING is simply THINKING on paper -- or with electrons. ... The Academy does not want to teach Grammar, Syntax and Spelling for the same ... Illiterates from our High Schools and Colleges every year. ...
    (alt.usage.english)