std-getdist | ![]() ![]() |
STD-GET1DIST is basically the same as GETDIST with one argument,
STD-GET2DIST the same as GETDIST with two arguments,
STD-GETDIST (full options) simulates (PROGN (INITGET flag kwd)(STD-GET2DIST)) and more.
If a lisp function given at the prompt returns a valid type this one is accepted.
With std-getdist the additional INITGET initialization and default value check may be omitted, thus leading to easier looping code.
The user may enter a number or two points.
If the default argument is given (and it is not nil and the flag contains no bitvalue 1), then empty input is allowed as well.
flag: integer, same as the INITGET flag or nil
kwd: a initget-like string or a list of strings or nil
msg: a string to be displayed as a prompt. If nil "\nPoint: " is prompted.
def: a default value or nil.
bpt: a point from which the rubberband is drawn, and if a point is entered, from which the distance is measured or nil. If not nil only one point or a number is required. If nil a number or two points.
Same as GETDIST.
Interrupts the program flow, prints the formatted message and waits for user input.
(std-require 'STDINPUT)
Defined in STDINPUT