Glossary: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
= | =Numeric Formats= | ||
'''Multiplier (one per format, optional)''' | '''Multiplier (one per format, optional)''' | ||
Revision as of 19:22, 3 December 2008
Numeric Formats
Multiplier (one per format, optional) `1' through `9' appearing in the format string before the first `:' or `;'. The value will be multiplied by the single digit integer multiplier, first, before any other formatting is performed. If omitted, a `1' is assumed.
Sign Control (Use only one Max. per format, optional) `": no "sign character" will use only the default, show. `-' : show - for negative and a space for positive values
Polarity Modification (use none, one or both in the same format, optional) `*' : multiply value times minus one. This is always executed second by ncPost, regardless of order in format string. `+' : show absolute value. This is always positive and always executed first by ncPost.
Digit Control `": no decimal point control character implies an integer value. `0' : a fixed digit that may not be suppressed. Zeros will show. `b': a fixed digit that will display a blank instead of a zero.
Decimal Point Control ": no decimal point control character implies an integer value. `.':show the decimal point. `^': do not show the decimal point.
Zero Control (optional) `;': you may ad a `;' to the end of a format. the text following the `;' will be output for any value equal to zero. If omitted, default zero will be from the actual format, which may reduce to nothing in the case of ###.###. Rounding Control (optional) `:': this character my be added, followed with a 1, 2, or 5. This is the value that the last digit in the format will be rounded to. If omitted, a 1 is assumed. Some Examples are: {2.34531}
###.#### pretty standard for modern controls {2.3453} ###.#### pretty standard for modern controls {2.3453} ###.####;0 force zero to `0.' {2.3453} 2##.#### multiply times 2 {4.6906} ###.####;0.:5 round to nearest .0005 {2.3455} *###.####;0.:2 times minus one {-2.3454} +*###.####;0.:5 absolute value, then times minus one (always negative) {-2.3455} +*##.### show + and - signs and force negative {-2.345} 3+*##.### above times 3 {-7.036} 00##.##0 stupid, `#'s have effect only when on the outside {0002.345} 0000.000 same effect as above {0002.345} ##00.0000# {02.34531} ##00^0000# stupid, formats without a visible decimal point may not have suppressible characters(`#') on both sides of the decimal and outside. The control has no way to figure out the real value. {0234531} ###^###0 standard fixed format,leading zero suppression,1 equals .0001 {23453} 0##^#### standard fixed format,trailing zero suppression, 1 equals 100.0000 {0023453} ### integer {2}
To use the new `b' correctly, it should be inside any `#' and outside any `0'.
##b0.00b# {+b2.3453, the b represents a space}.
The standard convention is to list Multiplier first. Sign control second, Polarity modifiers third, followed by Digits and Decimal point control characters. Then comes special Zero control and Round control last. Following this simple convention will make it easier on everyone.
When using Number commands, especially in lathe, use Radius Number commands and format them times two. We will probably eliminate the Diameter Number commands at some point in the future.