I'm posting this because I'm a bit of tiring looking at code written like:
IF Amount>0 THEN BEGIN
CurrReport.SHOWOUTPUT(TRUE);
END ELSE BEGIN
CurrReport.SHOWOUTPUT(FALSE);
END;
As any expression that contains comparision operators returns a boolean value and a boolean value is what SHOWOUTPUT wants, it's a lot cleaner, simpler and more readable to write it as:
CurrReport.SHOWOUTPUT(Amount>0);
Similarly, functions that return boolean values can be simply used everywhere a boolean value is needed without assigning them to a variable. (Note: it's a good practice to name boolean functions as one would word the answer to yes/no question: ParentOrderExists, IsNegative, BalanceIsOverCreditLimit, etc.)
So if you have a function called BalanceIsOverCreditLimit then you can just
CurrForm.Name.UPDATEFONTBOLD(BalanceIsOverCreditLimit(Rec));
This improves readibility a lot.
Comments
But it is not so easy to let others use it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
RIS Plus, LLC
http://www.BiloBeauty.com
http://www.autismspeaks.org
same example is
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I double that...
B3 Technologies - Making Technology Serve the People