Changes between Initial Version and Version 1 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/FormatNetWt


Ignore:
Timestamp:
08/20/10 10:09:42 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/FormatNetWt

    v1 v1  
     1= FormatNetWt =
     2Format a string representation of the net weight
     3
     4{{{
     5string FormatNetWt(int nScale, int nLen = 7);
     6
     7char* FormatNetWt(int nScale, char* pszBuffer, int nLen = 7);
     8}}}
     9
     10== Parameters ==
     11
     12 * nScale - scale number
     13 * pszBuffer - character array to write result into. Must be long enough to hold the string and null terminator.
     14 * nLen - length to format the string, spaces will be padded to the left.
     15
     16== Return Value ==
     17
     18 * Returns the string formatted net weight.
     19
     20== Remarks ==
     21
     22This will format the raw net weight into appropriate divisions and add zeros for zero weight if necessary based on the interval. For example, if interval of 20 lb is specified and the weight is zero the output will be "   00".
     23
     24== Examples ==
     25
     26{{{
     27string strWt = FormatNetWt(1);
     28DisplayText(0, 0, strWt);
     29}}}
     30
     31{{{
     32char szWt[20];
     33FormatNetWt(1, szWt);
     34DisplayText(0, 0, szWt);
     35}}}
     36
     37== See Also ==
     38
     39 * FormatGrossWt
     40 * FormatTareWt
     41 * FormatWt