Get it, thanks for the answer.
moudianzi
6
Posts
1
Topics
1
Following
A member registered Nov 08, 2016
Recent community posts
[beta, updated Oct 15] A whole lot of things comments · Posted in [beta, updated Oct 15] A whole lot of things comments
The #mfunc is useful, and i can do this with it:
#mfunc foreach(i, ins, ary) \
for (var i##__ = array_length_1d(ary), i = 0; i < i##__; i++) { var ins = ary[@ i];
var array = [100, 101, 102];
foreach (i, ins, array)
show_debug_message(i);
show_debug_message(ins);
}
It's cool, but missing a left brace.
I wonder if i can write it with the left brace just like this in some way:
#mfunc foreach(i, ins, ary){ \
for (var i##__ = array_length_1d(ary), i = 0; i < i##__; i++) { var ins = ary[@ i];
var array = [100, 101, 102];
foreach (i, ins, array) {
show_debug_message(i);
show_debug_message(ins);
}