Lines Matching full:dc
28 .TH "DC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual"
34 \f[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
54 If no files are given on the command\-line, then dc(1) reads from
56 Otherwise, those files are processed, and dc(1) will then exit.
62 and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
64 The following are the options that dc(1) accepts.
129 then after processing all expressions and files, dc(1) will exit, unless
135 \f[B]\-f\-\f[R] or equivalent is given, dc(1) will give a fatal error
150 then after processing all expressions and files, dc(1) will exit, unless
155 \f[B]\-f\-\f[R] or equivalent is given, dc(1) will give a fatal error
209 to having them in dc(1).
225 used to having them in dc(1).
228 This option is also useful in hash bang lines of dc(1) scripts that
266 Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
277 \f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
285 balanced before dc(1) parses and executes.
292 \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will
295 \f[B]dc >&\-\f[R], it will quit with an error.
296 This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
299 If there are scripts that depend on the behavior of other dc(1)
305 \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will
308 \f[B]dc 2>&\-\f[R], it will quit with an error.
309 This is done so that dc(1) can exit with an error code when
312 If there are scripts that depend on the behavior of other dc(1)
328 The max allowable value for \f[B]ibase\f[R] can be queried in dc(1)
353 The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
380 This means that the pseudo\-random values from dc(1) should only be used
437 In addition, dc(1) accepts numbers in scientific notation.
449 For example, if \f[B]ibase\f[R] is \f[B]16\f[R] and dc(1) is given the
451 \f[B]2550000000000\f[R], and if dc(1) is given the number string
997 If either or both of the values are not numbers, dc(1) will raise an
1006 If either or both of the values are not numbers, dc(1) will raise an
1018 If either or both of the values are not numbers, dc(1) will raise an
1027 If either or both of the values are not numbers, dc(1) will raise an
1039 If either or both of the values are not numbers, dc(1) will raise an
1048 If either or both of the values are not numbers, dc(1) will raise an
1060 If either or both of the values are not numbers, dc(1) will raise an
1069 If either or both of the values are not numbers, dc(1) will raise an
1081 If either or both of the values are not numbers, dc(1) will raise an
1090 If either or both of the values are not numbers, dc(1) will raise an
1102 If either or both of the values are not numbers, dc(1) will raise an
1111 If either or both of the values are not numbers, dc(1) will raise an
1124 If there are no macros, or only one macro executing, dc(1) exits.
1130 macros, dc(1) exits.
1136 to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
1137 \f[B],Q\f[R] will make dc(1) exit.
1195 \f[B]0\f[R] in the top item) when dc(1) starts, dc(1) requires that each
1196 register\[cq]s stack must always have at least one item; dc(1) will give
1259 Unlike most other dc(1) implentations, this dc(1) provides nearly
1273 When dc(1) encounters an error or a signal that it has a non\-default
1286 Thus, when dc(1) resets, it skips any remaining code waiting to be
1292 Most dc(1) implementations use \f[B]char\f[R] types to calculate the
1294 This dc(1) does something different.
1306 In addition, this dc(1) uses an even larger integer for overflow
1311 The following are the limits on dc(1):
1361 if dc(1).
1377 As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
1381 This is another way to give command\-line arguments to dc(1).
1389 functions that the user might want every time dc(1) runs.
1396 For example, the string \f[B]\[lq]/home/gavin/some dc file.dc\[rq]\f[R]
1398 \[dq]dc\[dq] file.dc\[rq]\f[R] will include the backslashes.
1404 `dc' file.dc\[rq]\f[R], and vice versa if you have a file with double
1415 (\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
1426 If dc(1) is not in interactive mode (see the \f[B]INTERACTIVE MODE\f[R]
1427 section), then this environment variable has no effect because dc(1)
1431 However, when dc(1) is in interactive mode, then if this environment
1432 variable exists and contains an integer, a non\-zero value makes dc(1)
1433 reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
1435 then dc(1) will exit on \f[B]SIGINT\f[R].
1447 exists and contains an integer, then a non\-zero value makes dc(1) use
1448 TTY mode, and zero makes dc(1) not use TTY mode.
1460 exists and contains an integer, a non\-zero value makes dc(1) use a
1461 prompt, and zero or a non\-integer makes dc(1) not use a prompt.
1475 contains an integer, a non\-zero value makes dc(1) exit after executing
1476 the expressions and expression files, and a zero value makes dc(1) not
1486 contains an integer, a non\-zero value makes dc(1) clamp digits that are
1550 characters (dc(1) only accepts ASCII characters), attempting to open a
1554 The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
1555 always exits and returns \f[B]4\f[R], no matter what mode dc(1) is in.
1557 The other statuses will only be returned when dc(1) is not in
1564 These exit statuses allow dc(1) to be used in shell scripting with error
1568 Like bc(1), dc(1) has an interactive mode and a non\-interactive mode.
1574 In interactive mode, dc(1) attempts to recover from errors (see the
1583 available, and thus, dc(1) can turn on TTY mode, subject to some
1588 that environment variable contains a non\-zero integer, dc(1) will turn
1592 \f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
1631 Sending a \f[B]SIGINT\f[R] will cause dc(1) to do one of two things.
1633 If dc(1) is not in interactive mode (see the \f[B]INTERACTIVE MODE\f[R]
1636 an integer or it is zero, dc(1) will exit.
1638 However, if dc(1) is in interactive mode, and the
1640 then dc(1) will stop executing the current input and reset (see the
1644 If dc(1) is processing input from \f[B]stdin\f[R] in interactive mode,
1646 If dc(1) is processing input from a file in interactive mode, it will
1650 This means that if a \f[B]SIGINT\f[R] is sent to dc(1) as it is
1651 executing a file, it can seem as though dc(1) did not respond to the
1659 \f[B]SIGTERM\f[R] and \f[B]SIGQUIT\f[R] cause dc(1) to clean up and
1661 The one exception is \f[B]SIGHUP\f[R]; in that case, and only when dc(1)
1663 will cause dc(1) to clean up and exit.
1667 If dc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
1679 This dc(1) ships with support for adding error messages for different
1684 The dc(1) utility operators and some behavior are compliant with the