Howto:Extend Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 80: Line 80:


= Argument Processing =  
= Argument Processing =  
The arguments to the function are passed in in the args array. The "me" reference is set if the function was called as a method call on an object (e.g. object.your_function() instead of just
The arguments to the function are passed in in the args array. The number of arguments is passed via argc (this is basically consistent with the standard signature of main in C/C++).
your_function(), in which case "me" would be set to the object).
 
So, if you know that you require a certain number of arguments, you can also directly check argc for matching your requirements.
 
The "me" reference is set if the function was called as a method call on an object (e.g. object.your_function() instead of just your_function(), in which case "me" would be set to the object).


The naRef objects can be manipulated using the functions in [http://simgear.org/doxygen/nasal_8h-source.html nasal.h].
The naRef objects can be manipulated using the functions in [http://simgear.org/doxygen/nasal_8h-source.html nasal.h].
2,561

edits

Navigation menu