1 LISP LIBRARY PACKAGES MANUAL 1 LISP LIBRARY PACKAGES MANUAL READNUMBER 1 INPUT/OUTPUT 1 READNUMBER 6 READNUMBER contains functions for implementing a calculator-type menu for getting numbers from the user. (RNUMBER MSG POSITION MSGFONT DIGITFONT INCLUDEABORTFLG FLOATINGPTFLG POSITIVEONLYFLG ACCEPTTYPEINFLG ) [Function] brings up a menu that looks like a calculator number pad. The user's selections on the digits are accumulated in a displayed total. The number pad includes a backspace key (bs), a clear key (clr), and a +/- key (-). When ŠŠok'' is selected, the total is returned. If MSG is given, it is printed at the top of the menu. If POSITION is a position, the menu will be put there; otherwise it will be put under the cursor. If MSGFONT is a font, MSG will be printed in it. If MSGFONT is NIL, DEFAULTFONT is used. If DIGITFONT is a font, the labels on the number pad keys will be printed in it. If DIGITFONT is NIL, BOLDFONT is used. If INCLUDEABORTFLG is non-NIL, the menu will also include an abort key (abt). If the abort key is pressed, RNUMBER returns NIL. If FLOATINGPTFLG is non-NIL, the menu will include a decimal point and the value returned may be a floating point number. If POSITIVEONLYFLG is non-NIL, the menu will also include not include a +/- key (-) and the user will only be able to input positive number (but see ACCEPTTYPEINFLG below). If ACCEPTTYPEINFLG is non-NIL, the menu will also respond to user typed input. In this mode, carriage return corresponds to ok. If the user types in a decimal point (.) or a minus sign (-), they will be accepted, even though they are not options in the numberpad menu. If the user closes the number pad window, the action taken by RNUMBER depends upon the value of INCLUDEABORTFLG. If INCLUDEABORTFLG is NIL, RNUMBER generates an error (i.e., calls (ERROR!)). If INCLUDEABORTFLG is non-NIL, RNUMBER returns NIL (the same thing it does if the abort key is pressed). Examples of use: (RNUMBER '(How many WIDGITS would you like?) will result in the following menu being popped up: ‚k˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Ŕ€@€@‘"8đáÇÇ@‘"‰€@‘DąĹˆ€*‰€@Ÿ"DP&H€*‰@‘"TQäH€*‰p@‘"TR$E‰€@‘"(R$E‰€@‘(QäB8đáÁ@€@€ @€@€@€p8€@€@@‘DĐGq!Ä@@‘"D0H‘B €@•"DH‘ƒá@•"Dˆ‘B@Š"L0ˆ“"!@Š4Đ Á@€@€@€@€˙˙˙˙˙˙˙@€˙˙˙˙˙˙˙@€@€@€@€ @€ @€Íó@€đmł@€đ ƒ@€ ƒ@€mƒ@€̓@€@€@€@€@€@€@€@€`x@€ŕĚ3@€ŕ @€`@€`0@ƒ˙˙˙˙˙˙˙Ă``3@ƒ˙˙˙˙˙˙˙Ă`Ŕ3@ƒĂ`ü@ƒĂ@ƒ<Ă@ƒfĂ@ƒfĂ@ƒfĂ@ƒfĂ@ƒfĂ@ƒfĂŕ|@ƒ<Ăŕ`3@ƒĂ``0@ƒĂ`ř>@ƒĂ`Ě3@ƒ˙˙˙˙˙˙˙Ăđ 3@ƒ˙˙˙˙˙˙˙Ă`Ě3@€`x@€@€@€@€@€@€@€@€đx@€0Ě3@€`Ě3@€`x3@€ŔĚ@€ŔĚ@€€Ě3@€€x@€@€@€@€@€@€@€@€x@€Ě@€Ěćc@€˛Ě6Ă@€¸Ě7ƒ@€ŽĚ6Ă@€ŚĚ6c@€<xć3@€@€@€@€@€˙˙˙˙˙˙˙@€˙˙˙˙˙˙˙@€@˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Ŕ (RNUMBER '(How far to the left?) NIL '(CLASSIC 12) '(MODERN 14) T T) will result in the following menu being popped up: •f˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ř€€€œŕ0Ŕ €ˆ@P@B@B@ˆ@@@B@B@ˆC7`áĂŔń€ňÁ€C8đ@Ä’@B!@B@C"@D@€ˆDŠ€@áB@B#ŔGAˆDŠ€A!B@B"DAˆD…BaR@R"@DPœă᳀a€gq€ă8a€€€€˙˙˙˙˙˙˙č€˙˙˙˙˙˙˙č€h€Ţzh€RJ