NCalc scripting documentation?
Is there any good reference source for this anywhere? I've spent (wasted?) weeks wading through the scripts in existing dashes and overlays trying to make sense of it all and using trial and error to get anywhere. The documentation is very sparse, doesn't cover everything, and doesn't explain the examples that well either. Is it deliberately made this way to frustrate everyone? Surely a good complete document must exist somewhere instead of relying on snippets spread all over the place?
Ncalc is a basic computation engine the complete documentation of the engine is available here : https://github.com/sheetsync/NCalc/wiki . The simhub documentation is short because it was originally intended for basic use (divide by 100, change unit, concatenate texts , simple if/else...) Lot of people have been pushing it really hard, but it's not the use I had planned originally 😀 and it makes indeed barely understandable formulas (even for me), if you are digging in such kind of formulas it's probably why it's really hurting. ncalc is basically really close to excel formulas, and for more complex stuffs ideally it's better to use the plugin sdk to generate complex data (to continue on the excel analogy, ncalc is like excel formulas, plugin sdk is like VBA macros)
Considering the heavy flexibility given by ncalc I admit I had a hard time to find relevant examples, that's why I relied mostly on out of the box dashs to demonstrate "real life" examples, instead of theoretical examples.
Obviously I'm open and if you see some relevant examples/orientations for the documentation I would be happy to add it. (simple computations obviously, as I said ncalc can be tortured for complex computations but that's not the goal, and I don't want to demonstrate that)
What are you trying to compute exactly ?
Thanks for the explanation, it makes a bit sense now why it's not well documented. I was mainly trying to understand some of the syntax and functions of it in general. Headache stuff at times 😀.
It was tricky, but with my basic understanding of programming and the reference material here I was able to roughly start figuring out how to make some of the basic customizations in dash studio.
The question I have, is there some kind of reference cheat sheet out there that shows what the iRacing "values" equate to? Again, basic understanding so my terminology is going to be pathetic, but I was reverse engineering some dashes and searching on the internet to try and interpret some information and I stumbled on simracingapp data that showed me for "xxxCarLeftRight" LRClear=1, LRCarLeft=2, LR2CarsLeft=5, etc. Is there a master document out there that tells you want all these expressions are for all the different field values (carleftright, enginewarnings, etc.)?