Talk:Nasal scripting language
Jump to navigation
Jump to search
Contents that need to be incorporated
Todo
- mention/explain nil
- shorthand ops: += *= ~= /=
- operator precedence, prioritizing expressions using parentheses
- multi-assignments don't work as expected for functions with multiple return values
Mailing List Discussions
Usage
- Use of listeners to wait for events
- Nasal & "var"
- nasal variables
- Nasal, systime()
- Nasal, airportinfo()
- Nasal, removelistener
- logging nasal listener calls
- new features
- Nasal in scenery object XML files
- Nasal in scenery object XML files
- New Nasal Features (named function args, vector slicing, multi-assignments)
- Adding a nasal function in C/C++
- Nasal: new props.Node methods: alias()/unalias()
- nasal hash, populating via foreach
- new Nasal module: debug.nas
- logging to XML
Features
- nasal development news
- Nasal: new command "removelistener()"
- New Nasal in CVS
- nasal functionality?
- nasal iolib & security
Nasal Modules
Moving to Nasal Modules.
setprop() functionality
setprop() concatenates a list of input arguments by means of inserting a "/" in between. That is nice for properties, as this slash is part of the tree. However, when one wants to make use of indices, like [0], one has to concatenate by hand (using "~") inside one part of the string argument list. An example is:
var i = 4; setprop("instrumentation","cdu","page["~i~"]","title","MENU");
This results in instrumentation/cdu/page[4]/title = 'MENU' (string)
.
Hcc23