Glossary

From Compost Wiki
Revision as of 22:59, 12 September 2012 by Danm (talk | contribs) (Fixed Digit Control entries.)
Jump to navigation Jump to search

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)

  • absent: 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

  • #: A fixed digit that will be suppressed if it is a leading or trailing zero.
  • 0: A fixed digit that cannot be suppressed. Leading and trailing zeros will be output.
  • b: A fixed digit that will output a blank in place of each leading and trailing zero.

Decimal Point Control

  • absent: No decimal point control character implies an integer value.
  • .: Show the decimal point.
  • ^: Do not show the decimal point.

Zero Control (optional)

  • ;: You may add 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.