The Problem with MMF:
MMF's expression editor is not very good. Have you ever written a complex expression and tried decyphering it a month later? It's awful.
Any whitespace you used to break it all up a little gets removed when you finalise your expression. You can't include comments. And if you use the same expression more than once in the same formula, you have to constantly repeat it. So for instance, if you have a string expression, and you want to change where the main string is being taken from, you may have to update three of four different places in the same expression.
The gist is, it sucks.
E++ Is Your Friend
So, I'm designing E++ to help out. It is a separate application, which uses a kind of Variable-Based Markup System to write your expressions in. It then converts these into a single expression string that you can paste into MMF.
It's variable-based in that you can define variables in it (logical enough, lol). So for instance, suppose you want an expression that strips out //comments.
You can write it in E++ like this:
//This expression will strip out any
//double-slash comments
//Get the text
text = Edittext$("Text Area");
//Get the current pointer location
pointer = Pointer("VARS");
//Get the first // to the right of the pointer
start = find(text, "//", pointer);
//Get the first NEWLINE to the right of pointer
end = find(text, newline$, pointer)+2;
//Get the text left of the comment
left = left$(text, start);
//And right...
right = right$(text, len(text)-end);
//Print the final result
left + right
//This will strip out the comment from
//inside the string and put it back together
//again.
When it's done, E++ will be able to tell you what errors occurred in your string, where they were found, how to fix them. It may be able to offer suggestions to try and simplify your expression if you get an Expression Too Complex error in MMF.
Basically, it's a tool no serious MMF user should be without.
|