Lasso Soft Inc. > Home

[chequeboxes]

Linkchequeboxes
AuthorJon Harris
CategoryOutput
Version8.x
LicensePublic Domain
Posted17 Jan 2006
Updated17 Jan 2006
More by this author...

Description

I use this tag as part of a pdf generator which prints the digit names in boxes on a cheque. Just pass it the amount and the number of digits (optional) and it will return an array with them in. If the number of digits is less than required it will pad them with 'zeros'.

Sample Usage

[chequeboxes: -amount='500',-digits='5']

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.

 0  ;
		loop: -loopto=#padding ;
			#digitarray->(insert: 'zero') ;
		/loop ;
	/if;
	
/if ;

// the meat! get each digit and find its name.

loop: -loopto= #digitcounter;

	local: 'thedigit' = (String_Extract: #amount,  -StartPosition=(loop_count),  -EndPosition=(loop_count)) ;
	local: 'theword' = #wordsarray->(get: (integer: #thedigit) + 1) ;

	#digitarray->(insert: #theword) ;

/loop ;
	
	// usage somthing like this
	// [chequeboxes: -amount='500',-digits='5']
	

	return: #digitarray;
    /define_tag;

?>

Comments

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