Features:
- Various configurable styles.
- Working scroll bars, thanks to Tom
- Adequate REPL-ness.
See the wiki for more information!
http://wiki.flightgear.org/Interactive_Nasal_Console
N.B. This makes some (sane) changes to other Nasal files, including
expanding some of the Canvas API.
Add benchmark_time, rank, and print_rank. Modify benchmark to return/
pass-through the values of the function, appending to a vector if there
are multiple executions.
It conflicts with Jester's debugging setup, and Andy says there should be
no NaN in the first place. This is a bug that needs to get fixed. Just
enable isnan() if you want to detect NaNs in the meantime. (The MP system
creates them ATM. The property getters shall turn them into nil.)
setprop(), props.Node.set{,Int,Bool,Double}Value() complain if they couldn't
write, e.g. because the target property is write protected, or doesn't have
a tied setter function.
- exit was only justified at times where fgcommand() needed an explicit
node statement, which made using it a bit clumsy. Nowadays that's only
fgcommand("exit"), which is as good as debug.exit() was.
- isnan() is really only for debugging and, thus, not in the global
namespace. Nasal code should never generate NaNs (though it's easy:
var nan = 1/0; There! :-), and NaNs imported from the C++ side (tied
properties!) should get fixed there. IOW: routine checks for nan in
Nasal can only be temporary hacks/debugging measures.
props.nas: replace some "arg[*]" by named args
aircraft.nas: load aircraft data only if the file exists (to avoid warning)
debug.nas: no space before colon & fixed comment & cosmetics
- fuel.nas: use props.initNode()
- debug.nas: fix comment
- globals.nas: load_nasal(): check extension and set module arg
- io.nas: update log message (the rules are no longer for io.open() only)
debug.dump([a, b]) for that, but debug.dump(a, b) is more obvious)
- change output colors: variable names are no longer bold, all property
attributes are now blue, not just the property type)
- drop redundant braces & other cosmetics