2,736
edits
Red Leader (talk | contribs) (→Functions: Doc benchmark_time()) |
Red Leader (talk | contribs) (→Functions: Doc dump()) |
||
| Line 143: | Line 143: | ||
=== dump() === | === dump() === | ||
{{Nasal doc | |||
|syntax = debug.dump([arg[, arg[, ...]]]); | |||
|text = Dumps the given arguments in the [[console]]. If no arguments of given, the local namespace will be dumped. | |||
|param1 = arg | |||
|param1text = Anything. Literally, anything. There may be as may arguments as you like. If more than one argument is given, each will be dumped separately with an index. | |||
|example1 = var x = nil; | |||
debug.dump(); # prints "{ x: nil, arg: [] }" | |||
|example2 = debug.dump("Hello, World!"); # 'Hello, World!' | |||
debug.dump(1234); # 1234 | |||
debug.dump(nil); # nil | |||
debug.dump(["a", "b", "c"]); # ['a', 'b', 'c'] | |||
debug.dump({ a: 1, b: 2, c: 3 }); # { a: 1, b: 2, c: 3 } | |||
debug.dump(props.Node.new()); # < = nil (NONE)> | |||
debug.dump(airportinfo()); # <airport> | |||
debug.dump(func(a){ print(a); }); # <func> | |||
|example3 = debug.dump( # dump, showing the index of each argument | |||
"Hello, World!", | |||
1234, | |||
nil, | |||
["a", "b", "c"], | |||
{ a: 1, b: 2, c: 3 }, | |||
props.Node.new(), | |||
airportinfo(), | |||
func(a){ print(a); }, | |||
); | |||
}} | |||
=== isnan() === | === isnan() === | ||
=== local() === | === local() === | ||