2,736
edits
Red Leader (talk | contribs) (→Functions: Start local()) |
Red Leader (talk | contribs) (→local(): Add examples) |
||
| Line 186: | Line 186: | ||
|param1 = frame | |param1 = frame | ||
|param1text = Optional integer specifying the frame. Corresponds to the argument given to {{func link|caller()}}. | |param1text = Optional integer specifying the frame. Corresponds to the argument given to {{func link|caller()}}. | ||
|example1 = | |example1 = var n = 12; | ||
|example2 = | debug.local(); # prints "{ n: 12, arg: [] }" | ||
|example2 = var sqr = func(a){ | |||
debug.local(); # prints "{ a: 16 }" | |||
debug.local(1); # prints "{ sqr: <func>, arg: [] }" | |||
return a * a; | |||
} | |||
print(sqr(16)); | |||
}} | }} | ||