Re: [Flightgear-devel] Re: Nasal advice...

2005-04-24 Thread Erik Hofman
Melchior FRANZ wrote: Alternatively, take TeX's syntax: `\A ... for extra geek points. ;-) If you are really seeking for ggek points: $eq1 = "2 * $val"; $eq2 = "-7 + $val"; test_val = (1 < (3 + #"-3 * ${want_eq1 ? $eq1 : $eq2}"); :-) Erik ___ Flightgea

RE: [Flightgear-devel] Re: Nasal advice...

2005-04-24 Thread Vivian Meazza
Melchior FRANZ > * Vivian Meazza -- Sunday 24 April 2005 20:41: > > Andy Ross wrote > > >`A` @A $A %A &A @"A" $"A" %"A" &"A" c"A" > > > > Anything but `A` - I'm bound to misread that in the future sometime. I > > favour a function. > > Hmm ... and I changed my mind and wou

Re: [Flightgear-devel] Re: Nasal advice...

2005-04-24 Thread Andy Ross
Melchior FRANZ wrote: > I was thinking |A| (value of A), but I'm still hoping for binary > ops, so this isn't a good idea. Function sounds good. Bit operations as syntax aren't coming. All numbers in Nasal are floating point, and don't mix nicely with bit twiddling. What I'm thinking about inste

Re: [Flightgear-devel] Re: Nasal advice...

2005-04-25 Thread Andy Ross
Melchior FRANZ wrote: > Wouldn't work in my case. Would only make it even less > elegant. Then I better stick with this: Only if you don't want to write your own functions (in which case every feature I don't want to support is going to be inelegant and you'll never win until I turn Nasal into ano

Re: [Flightgear-devel] Re: Nasal advice...

2005-04-25 Thread Andy Ross
I wrote: > Write a function to [...]. Compose them appropriately to set bits > in numbers. Probably four lines of code, Turns out it's three lines of code: n2s = func(n) { var s = buf(6); setfld(s, 0, 48, n); return s; } getbit = func(n, b) { getfld(var s = n2s(n), b, 1) } setbit = func(n