` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Working with 2 or 4 Decimal Places
2003-11-18 -- Ray Goudie
 
In your dictionary file defintion, use the four decimal places for all monetary fields, as required by spec. Ensure that every such monetary field has a constant picture, say, "@n14.4". In your config file, have a byte that determines how many decimnal digits a particular customer wants to use. Then, in the Init method of your form windows, just after opening the window, you loop through all the fields and if the fields picture is equal to "@n14.4", you replace the picture with the appropriate picture according to the user's preference: --- currentField = 0 loop currentField = window{PROP:NextField, currentField} if currentField = 0 break end if (currentField{PROP:Type} = CREATE:Entry) and | (currentField{PROP:Text} = '@n14.4') case decimalPlaces of 2 currentField{PROP:Text} = '@n12.2' of 3 currentField{PROP:Text} = '@n13.3' end end end --- I feel that there may be more effective methods, but none come to mind at this time.


Today is April 29, 2024, 11:57 pm
This article has been viewed 35116 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: