MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / FErrorValR

Function FErrorValR

general.cpp:1516–1535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1514// Print error message for out of range real parameter to a command switch.
1515
1516flag 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.

Callers 4

NProcessSwitchesRareFunction · 0.85
FProcessSwitchesFunction · 0.85
NProcessSwitchesXFunction · 0.85
NProcessSwitchesRareXFunction · 0.85

Calls 2

FormatRFunction · 0.85
PrintErrorFunction · 0.85

Tested by

no test coverage detected