| 1514 | // Print error message for out of range real parameter to a command switch. |
| 1515 | |
| 1516 | flag FErrorValR(CONST char *szOpt, flag f, real rVal, int nPar) |
| 1517 | { |
| 1518 | char sz[cchSzMax], szPar[cchSzDef], szVal[cchSzDef]; |
| 1519 | |
| 1520 | if (!f) |
| 1521 | return fFalse; |
| 1522 | if (nPar <= 0) |
| 1523 | szPar[0] = chNull; |
| 1524 | else |
| 1525 | sprintf(szPar, "parameter #%d of ", nPar); |
| 1526 | if (rVal != rLarge) { |
| 1527 | FormatR(szVal, rVal, -6); |
| 1528 | sprintf(sz, "Value %s passed to %sswitch %c%s out of range.\n", |
| 1529 | szVal, szPar, chSwitch, szOpt); |
| 1530 | } else |
| 1531 | sprintf(sz, "Bad value passed to %sswitch %c%s\n", |
| 1532 | szPar, chSwitch, szOpt); |
| 1533 | PrintError(sz); |
| 1534 | return fTrue; |
| 1535 | } |
| 1536 | |
| 1537 | |
| 1538 | // Print error message for a disallowed command switch. |
no test coverage detected