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

Function RInputRange

io.cpp:2509–2522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2507// This is identical to above except it takes/returns floating point values.
2508
2509real RInputRange(CONST char *szPrompt, real low, real high, int pm)
2510{
2511 char szLine[cchSzDef];
2512 real r;
2513
2514 loop {
2515 InputString(szPrompt, szLine);
2516 r = RParseSz(szLine, pm);
2517 if (FBetween(r, low, high))
2518 return r;
2519 sprintf(szLine, "Value %.0f out of range from %.0f to %.0f.",
2520 r, low, high);
2521 PrintWarning(szLine);
2522 }
2523}
2524#endif // WIN
2525

Callers 1

FInputDataFunction · 0.85

Calls 3

InputStringFunction · 0.85
RParseSzFunction · 0.85
PrintWarningFunction · 0.85

Tested by

no test coverage detected