| 1 | = FormatNetWt = |
| 2 | Format a string representation of the net weight |
| 3 | |
| 4 | {{{ |
| 5 | string FormatNetWt(int nScale, int nLen = 7); |
| 6 | |
| 7 | char* 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 | |
| 22 | This 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 | {{{ |
| 27 | string strWt = FormatNetWt(1); |
| 28 | DisplayText(0, 0, strWt); |
| 29 | }}} |
| 30 | |
| 31 | {{{ |
| 32 | char szWt[20]; |
| 33 | FormatNetWt(1, szWt); |
| 34 | DisplayText(0, 0, szWt); |
| 35 | }}} |
| 36 | |
| 37 | == See Also == |
| 38 | |
| 39 | * FormatGrossWt |
| 40 | * FormatTareWt |
| 41 | * FormatWt |