a # 1 66 R ' r#def prompt msg;j;k ' a # a,[1] ' $0 if 0=R,def H j#r#rUQH r#R,Q#msg ' a # a,[1] ' $0 if character def H r#r,(0=R,r)/Fdef ' a # a,[1] 'nscreen:$err if ~(~empty k)&&/k#jE'' -.0123456789e'' ' a # a,[1] ' $0 ifV/def=(def>0)XR,r#Cj ' a # a,[1] 'err:$1 H L#''not exactly '',((V/def>0)/Fdef),'' number'',(V/def>1)/''s''' a # a,[1] '" characters may be added or deleted from nscreen ' a # a,[1] ' $0 ' a # a,[1] '"prompt - prompt and check terminal entry or else default ' a # a,[1] '"from ''the apl handbook of techniques'' copyright 1978, ibm. ' a # a,[1] '"-prompt can examine keyboard entry, and either accept it ' a # a,[1] '" uncritically, return a specified default character vector, ' a # a,[1] '" or, if numeric values are requested, will check the ' a # a,[1] '" character set used, and can check for the specified length. ' a # a,[1] '"-msg is a character string, i.e., the prompting message. ' a # a,[1] '"-def, if character, is the default character string, or, '''' ' a # a,[1] '" if a scalar numeric value, n: ' a # a,[1] '" will accept any numeric vector if n=0 ' a # a,[1] '" will reject vector unless n=Rvector ' a # a,[1] '" if an integer vector, v, will accept a numeric ' a # a,[1] '" vector if its length is one member of v. ' a # a,[1] '"-uses: Gcharacter Gempty Gif GH ' Lfx a