Using some values in FileMaker formulas and scripts isn't very convenient because they are difficult to type or not clearly visible. The samples of these are spaces and tab characters, special symbols like "¶" and an empty value. A possible solution is to use “constant” custom functions instead. Here's a description of four: NULL, TAB, CR and SPACE.
Technorati tags: FileMaker, FileMaker 7, FileMaker 8, custom function.
Sometimes it may be difficult to tell a tab character from a space:
What is in quotes? Not quite evident, especially when you're reading the code when you had been doing other stuff for a few weeks. A clearer code would be more helpful:
The TAB here is a constant custom function. A “constant” custom function is a function that takes no parameters and always returns the same result. The TAB returns a tab character, of course. Note that a function with no parameters require no parentheses so the code looks pretty.
Such a function can also save you some time when you have to enter tabs or other difficult-to-type characters often. A good example of such a character is the "¶" symbol in Windows. I love using the CR function instead.
Similar thing happens with an empty value, most often when you want to empty a field. A couple of quotes sometimes looks too subtle; a loud and clear NULL (my favorite) is way better.
I even use SPACE sometimes when I want to amplify there must be a space somewhere.
Test unit tests
Assert Equals( TAB, " " ) & // use tab character here
Assert Equals( CR, "¶" ) &
Assert Equals( SPACE, " " )
Hi
Looks good! Keep up the great work. It very impressive. Thanks!
G'night
Posted by: sopitikoj | September 08, 2007 at 09:02 AM