In FlightGear, the simplest way to add new extension functions is to look at the existing functions in [http://cvs.flightgear.org/viewvc/source/src/Scripting/ $FG_SRC/Scripting]/NasalSys.cxx (src/Scripting/NasalSys.cxx).
There is a static table of function pointers referencing extension functions, along with their corresponding names in Nasal.
The following is a copy of the extension function list, taken in 05/2009:
So, the basic format is "name", function_pointer - whereas "name" refers to the internal name used by Nasal and its
script, and "function_pointer" has to use the right function signature and is a pointer to the implementation of the Nasal function in C/C++ code space:
// The function signature for an extension function: