Lasso Soft Inc. > Home


AuthorJustin Dennis
LicensePublic Domain
Posted13 Oct 2006
Updated13 Oct 2006
More by this author...


This tag easily displays any decimal in an accounting format similar to that used by Microsoft Excel. Negative numbers are enclosed in parenthesis and positive numbers are padded left and right with space equal to the space taken up by parenthesis. It's designed to be used with a font such as Verdana or other fixed-width font so that decimal points line up correctly when positive and negative numbers are displayed in a column.

Sample Usage

[Var: 'myDecimal' = decimal('-1234.56')]
[FormatAccounting: $myDecimal]

-> (1,234.56)

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

setformat(-groupchar=',', -precision='2');
	if(#new_amount < 0);
		return('(' + string_removeleading(#new_amount, -pattern='-') + ')');
		return('(' + string(#new_amount) + ')');



No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft