| 1 | = FormatTareWt = |
| 2 | Format a string representation of the tare weight |
| 3 | |
| 4 | {{{ |
| 5 | string FormatTareWt(int nScale, int nLen = 7); |
| 6 | |
| 7 | char* FormatTareWt(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 tare weight. |
| 19 | |
| 20 | == Remarks == |
| 21 | |
| 22 | This will format the raw tare weight into appropriate divisions and add zeros for zero weight if necessary based on the interval. For example, for interval of 20 lb is specified and the weight is zero the output will be " 00". |
| 23 | |
| 24 | == Examples == |
| 25 | |
| 26 | {{{ |
| 27 | string strWt = FormatTareWt(1); |
| 28 | DisplayText(0, 0, strWt); |
| 29 | }}} |
| 30 | |
| 31 | {{{ |
| 32 | char szWt[20]; |
| 33 | FormatTareWt(1, szWt); |
| 34 | DisplayText(0, 0, szWt); |
| 35 | }}} |
| 36 | |
| 37 | == See Also == |
| 38 | |
| 39 | * FormatGrossWt |
| 40 | * FormatNetWt |
| 41 | * FormatWt |
| 42 | |