ouadji,
Second variant emulates
times control directive behavior (it expands
% symbol in the rest of line with the number of current iteration):
points times 10 POINT %, %*%
;the same as
;points POINT 1, 1
;points_2 POINT 2, 3
;points_3 POINT 3, 9
;points_4 POINT 4, 14
;...
;points_9 POINT 9, 81
;points_10 POINT 10, 100
Better yet, since it's macro, you can use macro operators
# and
` (backquote/backtick) in data definition
points_1 = points; this is needed because subscript names was generated starting with second POINT instance
ppoints times 10 dd points_\\#%; imagine they're noncontiguous and randomly spaced
npoints times 10 db "points_", \\`%, 0; surely can be done with interpretive layer, but isn't this simpler?
to generate (for example) array of pointers to those structs, and strings (just don't forget to protect them with backslashes enough, so they won't trigger earlier than needed).
Usefulness of this is questionable; they can't be nested currently (
a times 3 times % db % don't expand second
times but replaces both
%s); no check for count<=0 is done (it fails differently for count<0 and count==0). Quick'n'dirty hack as it is — and I like it.
