* Buchanan, Stuart -- Friday 03 March 2006 10:30:
> --- Melchior FRANZ wrote:
> > Makes sense to me. (The implementation less so. :-)
> 
> Well, to be consistent I was copying code from elsewhere in the Nasal
> file.

... just not the placing of parentheses.  :-P



> I assume you have some way of doing this in half the number of lines 
> :)

That's not the main issue. You are using the indices of a Nasal array
as property indices. But properties aren't guaranteed to be continuous.
You could have engine[3] and engine[7], and no engine[0] etc. (Even
though nobody would probably do that.) Besides that, IMHO "foo += 1"
should be preferred to "foo = foo + 1". In the latter case one has
to check if the variables are really the same. Easy for "i" or "foo",
but less so with longer variable names. And finally, this

  for(i=0; i<size(engs); i=i+1)

can be written as

  forindex (i; engs)

Not that shorter is necessarily better, of course. But again, those
last two points were not what I found to "make less sense".



> > Makes sense, too, but I wonder if we shouldn't assign that globally
> > in keyboard.xml. Looking into map.pdf I see that n/N has no meaning
> > per default, but several aircraft defining it to mean the same:

> a) Obviously this function only applies to some aircraft. I haven't
> checked the effect of adjusting the prop on, say the c172 or j3cub.

True. But it applies to more aircraft than "select engine 4" or
"decrease spoilers".



> b) Some people are a bit concerned about using up all the keyboard
> assignments (though presumably they can be over-written in an aircraft
> .xml file?)

I'm usually concerned, too. But here we have 7 aircraft that use
n/N for propeller pitch already, and some are still missing (pa24,
pa28, aerostar, b29, ...?). There are a few dozens of keys still
unassigned (almost all Alt bindings), some could be removed or put
into extra files (like it was done with the carrier keys) or dialogs.
Living with unassigned key bindings doesn't buy us much, either.
Using them makes sense, wasting them does of course not.

m.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to