
6. SYSTEM CALLS B-63322EN-2/01
- 28 -
6.4 MESSAGE OUTPUT (INTEGER: DECIMAL NUMBER)
[Function name] sc_print_dec
[Function] Displays a message (integer) in decimal notation.
[Format] int sc_print_dec (int num, int dgt);
[Input] int num : Number to be output.
int dgt : Number of digits to be displayed (1 to 11)
[Output] 0 : Normal end.
Nonzero : Abnormal end (the value specified as the number of digits
to be displayed is invalid).
[Result] The output message can be viewed on the CNC-side message function
screen.
[Note] The display is right-justified.
If the number of digits in the actual number to be displayed is smaller
than the value specified as the number of digits to be displayed, blanks
are output to the positions corresponding to the insufficient digits.
If the number of digits in the actual number to be displayed is larger
than the value specified as the number of digits to be displayed, the
specified value is ignored, and the actual number is output left-
justified.