| Ads
by DomBible |
Formula Language -The introduction of programming languages into Notes/Domino, starting with LotusScript in R4, led to forecasts of the demise of the formula language. But the formula language remains a favored tool because its source code is compact and its performance excels. The fly in the ointment has been the lack of control features found in programming languages, particularly loops.
Lotus Notes/Domino 6 overhauls the formula language and introduces many new @functions. This article concentrates on the following enhancements to the formula language control features: The Formula language is a scripting language used by Lotus Notes.
It is often referred to as @Formula language (pronounced at-formula) because many language elements start with the @-character.
The Formula language is not a full programming language: it lacks looping constructs and there is only one function for conditional execution. However, Formula language is very good at the manipulation of strings and lists (arrays) of strings.
Note: in version 6 of Lotus Notes the Formula language has been extended to include looping and additional conditional statements.
"
Formula Language Techniques
-Lotus Notes provides a rich set of programming tools in an integrated environment. The release of Notes/Domino 6 has added to that toolkit by enhancing existing tools or languages, such as LotusScript and Java, and new tools have also been added, such as integrated XML support. With the variety of choices available, it is easy to overlook the venerable granddaddy of Notes programming languages, the Formula language. But overlooking the Formula language as an integral part of your toolkit is a mistake. This chapter introduces you to the Formula language, explains the basics of its use, and shows you some advanced techniques for enhancing your Notes/Domino applications. The remaining chapters in Part V expand your knowledge of the Formula language."
Enhancements to the formula language in Domino 6 -The introduction of programming languages into Notes/Domino, starting with LotusScript in R4, led to forecasts of the demise of the formula language. But the formula language remains a favored tool because its source code is compact and its performance excels. The fly in the ointment has been the lack of control features found in programming languages, particularly loops.
"
Formatting Dates In Formula Language
-Since we've been developing in Notes for many years, sometimes we forget that developers new to Notes may not know some of these things that we take for granted. Like taking a date field and displaying it in a ""familiar"" format. For example, we have gotten in the habit of showing all our dates, no matter what application, in WWW DD MMM YYYY format, as in Sun 01 Jan 2000. This is a format that everybody should understand, no matter what language they speak or what country they are from. If MM/DD/YYYY or DD/MM/YYYY is used, confusion can appear (03/04/2000 could be seen as April 3rd or March 4th, depending on your nationality). To show a date field in WWW DD MMM YYYY format, use this formula:"
The Right Tool for the Right Task -The formula language is fast becoming the lost jewel of Domino development. It's extremely powerful and executes quickly compared to any other programming option, except the API. Programmers often discount formula language because of its syntax. But just because a language is different, doesn't mean it's only for trivial problems. The formula language is like other list processing languages such as LISP. If you're a procedural, or even object-oriented programmer, you'll find the formula language very different and perhaps difficult to use effectively.
The formula language has two components: the standard formulas and the @Commands. This second set consists of routines that call code in the client software. Some of these have been programmed to function through the HTTP server. They're generally for execution of user interface actions, and are the true ""macro"" language of the product. I find it best to consider @Commands conceptually different from the rest of the formula language. I concentrate on the non-@Command functions when learning what's new with each release of Domino."
|
| |