| 2507 | // This is identical to above except it takes/returns floating point values. |
| 2508 | |
| 2509 | real 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 |
no test coverage detected