0.1PROMPTFORWORDisafunctionthatreadsinasequenceofcharacters,generallyfromthekeyboard,withoutinvolving-likesyntax.Theintentistomimictheprompted-readusedbytheAltoExecwhenaskingforloginnames,passwordsetc.Thusausercansupplyapromptingstring,aswellasa``candidate''string,whichisprintedandusediftheusertypesonlyawordterminatorcharacter(ordoesn'ttypeanythingbeforeagiventimelimit).Assoonasanycharactersaretypedthe``candidate''stringiserasedandthenewinputtakesitsplace.acceptsusertype-inuntiloneofthe``wordterminator''charactersistyped.Normally,thewordterminatorcharactersare,,,,or.Thislistcanbechangedusingtheargumentto,forexampleifitisdesirabletoallowtheusertoinputlinesincludingspaces.alsorecognizesthefollowingspecialcharacters:Control-A,,orAnyofthesecharactersdeletesthelastcharactertypedandappropriatelyerasesitfromtheechostreamifitisadisplaystream.Control-WorControl-QErasesallthetype-insofar.Control-RReprintstheaccumulatedstring.?Callsupa``help''facility.Theactiontakenisdenedbytheargumentto(seebelow).Normally,thisprintsalistofpossiblecandidates.Control-V``Quotes''thenextcharacter:aftertypingControl-V,thenextcharactertypedisaddedtotheaccumulatedstring,regardlessofanyspecialmeaningithas.Allowstheusertoincludeeditingcharactersandwordterminatorcharactersintheaccumulatedstring.[Function]hasamultiplicityoffeatures,whicharespeciedthrougharatherlargenumberofinputarguments,butthedefaultsettingsforthem(i.e.,whentheyaren'tgiven,oraregivenas)issuchtominimizethenumberneededintheaveragecase,andanattempthasbeenmadetoorderthemorefrequentlynon-defaultedargumentsattherstoftheargumentlist.Thedefaultinputandechoarebothtotheterminal;theterminaltableineectduringinputallowsmostcontrolcharacterstobe'd.returnsifanullstringistyped;thiswouldoccurwhennocandidateisgivenandonlyaterminatoristyped,orwhenthecandidateiserasedandaterminatoristypedwithnootherinputstillun-erased.Inallothercases,returnsastring.usesa(seepageX.XX)sothatasecondcallcannotbestartedbeforetherstonenished;primarilythisistolimitconfusionbetweenmultipleprocessesthatmighttrytoaccessthekeyboardatthesametime,orprintinthepromptwindow``atthesametime''0.1PROMPTFORWORDREADPROMPTFORWORDEOLESCAPELFSPACETABPROMPTFORWORDPROMPTFORWORDBSDELPROMPTFORWORD(PROMPTFORWORD)PROMPTFORWORDNILINDICATEPROMPTFORWORDNILPROMPTFORWORDPROMPTFORWORDMONITORLOCKTERMINCHAR.LSTGENERATE?LIST.FNPROMPT.STRCANDIDATE.STRGENERATE?LIST.FNECHO.CHANNELDONTECHOTYPEIN.FLGTIMELIMIT.secsTERMINCHARS.LSTKEYBD.CHANNELOLDSTRING|\8 i xW.4!4%&(A.X0D 7D=Y@CV-  #')c++/|18;;n>@CQFT  <P##'*,/:167>C:EH0R 2 -T!$')n+.257$: AGQ< X!#$a(+.x0@2 9{;?BM O  )i{g"$bLX !$')I+/ 7? =? C^J  ? o !'v)./4 47:<>CGIFIb'(*0Z124X:;?VADF6G  $2D\& !',+ A ^?^ &K*-6/59j< DH>J g %&w')7*` ;E 9 2#4$&6 < '3 7i"( */24=9,;/1*-29;?@BD0I -D   # *.J279<?F +]"m */7 57:?ErG)%v!`#',Z 25\8 ? EG(S #C5 { U "(?,h.49;3?\BH&6  Ba#U%)4,Q03.7;5=?gC&GgHs  0 !#Z%*.=13 8*:>#ACG  G,#%(*,/(5c8g;T@CFE  Tha!%g'+*/w367v:? F*GV]"Q&'+.e26B9;BC}G(   7\"(A)-01 8d9=@BF6N  S )./I_Y#J&)^-/2a38:?$AE  gE  "4#'_-3I8>AEH0  SUJ!>#&e(*o/U4{69<(!}D`m$xW V-,L J"l(I*1IF D A 1l % #2X 6D  Nr I  "}D`m$TxIF 3=B %-W#$). 6 A NP#  +6!} `m$6PROMPTFORWORDiscontrolledthroughthefollowingarguments:Ifnon-,thisiscoercedtoastringandusedforprompting;anadditionalspaceisoutputafterthisstring.Ifnon-,thisiscoercedtoastringandoeredasinitialcontentsoftheinputbuer.Ifnon-,thisiseitherastringtobeprintedoutforhelp,orafunctiontobeappliedtoand(afterbothhavebeencoercedtostrings),andwhichshouldreturnalistofpotentialcandidates.Thehelpstringorlistofpotentialcandidateswillthenbeprintedonaseparateline,thepromptwillberestarted,andanytype-inwillbere-echoed.Note:Ifisafunction,itsvaluelistwillbe``cached''sothatitwillberunatmostoncepercallto.Coercedtoanoutputstream;defaultsto,the``terminaloutputstream'',normally.Toachieveechoingtothe``currentoutputle'',use.Ifechoistoadisplaystream,itwillhaveaashingcaretshowingwherethenextinputistobeechoed.If,thereisnoechoingoftheinputcharacters.Ifthevalueofisasingle-characteratomorstring,thatcharacterisechoedinsteadoftheactualinput.Forexample,promptsforapasswordwithbeing``*''.Ifnon-,thisisthenumberofseconds(asaninteger)thatthecallerisiswillingtowaitwithnoinputfrom(seebelow);iftimeoutisreached,thenisreturned,regardlessofanyothertype-inactivity.Thisislistof``wordterminators'';itdefaultsto.Ifnon-,thisiscoercedtoastream,andtheinputbytesaretakenfromthatstream.defaultstothekeyboardinputstream.Notethatthisisthesameas,whichisakeyboardinputstream,notsuitableforusewith.Ifnon-,thismustbeastring,whichwillbedestructivelyusedtoreturntheanswer.Examples:0.2PROMPTFORWORDNILNILNILPROMPTFORWORDNILT(TTYDISPLAYSTREAM)(GETSTREAMNIL'OUTPUT)TLOGINNIL(CHARCODE(EOLESCAPELFSPACETAB))NILNILnotTbueredPROMPTFORWORDNIL(PROMPTFORWORD"WhatisyourFOOword?"'Mumble(FUNCTION(LAMBDA()'(GrumbleBletch)))PROMPTWINDOWNIL30)PROMPT.STRCANDIDATE.STRGENERATE?LIST.FNPROMPT.STRCANDIDATE.STRGENERATE?LIST.FNECHO.CHANNELDONTECHOTYPEIN.FLGDONTECHOTYPEIN.FLGDONTECHOTYPEIN.FLGTIMELIMIT.secsKEYBD.CHANNELCANDIDATE.WORDTERMINCHAR.LSTKEYBD.CHANNELOLDSTRING|b'" x\:\ B"v$* W<$!:"$/(*.0g 79 @4CEoU<uQ><| "#'*J.049;> AL<P S!%'J)S.=03 689?`A'C0H0J%)5,f/279>AcEeIH<dw* &`)3,H0145;w B(DGG< 9 "'*,s 2l5 7:ARBEWGIB<-ql*>L<'J,/z037 9>LD<\ "',.16;>q;QU !f# $((-.1r45:>"CuG9[<I[4<a X"3$( /1z37Hs3 <p+!%(z.0$59;>PB~G41e< )"d#);K?,<C"$)+-25B7;*<=BHCF+<I$P'",*-249Hs)n<* < $v'x)%$<NM '#(.0#pr< !%"$(+. 15Y7;}>A<fuz##(+.\047-:=/> BC'<?!&/(j*8|<| %"),+- 58:>A/w ( }`m$x\: WQ>|LB >L#.<<@ ;<41e,i$0$8<BE&#<rF{2jx&i  " "}`m$^Thisrstpromptstheuserforinputbyprintingtherstargumentasapromptinto;thentheproereddefaultanswer,``'',isprintedoutandthecaretstartsashingjustafterittoindicatethattheupcominginputwillbeechoedthere.Iftheuserfailstocompleteawordwithin30seconds,thentheresultwillbethestring.Thisrstpromptsinwhateverwindowiscurrently,andthentakesinausername;thesecondcallpromptswithandtakesinanotherword(thepassword)proeringacandidate,echoingthetyped-incharactersas``*''.0.3PROMPTWINDOWMumble"Mumble"(FRESHLINET)(LIST(PROMPTFORWORD(CONCAT"{"HOST"}Login:")(USERNAMENILNILT))(PROMPTFORWORD"(password)"NILNILNIL'*))(TTYDISPLAYSTREAM)"(password)"withoutx\:  n? # (_*-356;HZ  EH%&(,/{2?48;@CFH0X /!#(k,.b0368>?CGWI UxF5*G\  xC ":7 7:Y=W@B2C5E  uN).,2/17N;">HD Qz {#D$ +W-(}`m$x\:> ZWI#eTD *R P q OR!rM]L q Ja !r$G\'En {E }`m$VPROMPTFORWORD0.4|b'" x(}`m$ TIMESROMANGACHACMS  TIMESROMAN  TIMESROMAN j/m/(promptforword.PRESSVANMELLEAUGUST 19, 1983 12:59:36