I occasionally browse through what people are doing with LastCalc to see what kind of problems people encounter.
By far the most common was people typing something like:
double x = x*2
Hell, I've even made this mistake myself once in a while. Can you spot it? "x" is a parameter, so it must be capitalized. Initially I was going to make LastCalc pop up a warning when it spotted a function definition where it looked like they might have this problem.
But then I thought: why not just fix it? So now if you try the above, LastCalc will automatically capitalize the "X" parameter.
You may ask: if you can do this, why require the capitalization at all? Why not assume that if a word appears both before and after the = in a function definition, that it's a parameter? The reason is that there are several cases where this won't be true, in particular any kind of recursive function.
So my auto-correct system will only do its thing if no variables are capitalized and words appear on both sides of the =, which would tend to indicate that the user has made an error.
Sometime soon I'm going to have to stop procrastinating on the next major feature: user login and worksheet sharing...
Ian.
--
Ian Clarke