The function below causes J to wait for input as expected and gives me
temp 0
continue for more iterations ? put in y for yes
y
answer received
new total number of iterations
6
temp=: verb define
sco ' continue for more iterations ? put in y for yes'
ans=.(1!:1) 1
sco ' answer received'
if. ans='y' do.
sco' new total number of iterations'
tnit=.(1!:1) 1
end.
0$0
)
When I include the code inside the verb in another verb I get the
following . J does not wait for input
continue for more iterations ? put in y for yes
answer received
According to foreign conjunctions temp should not actually work because
(1!:1) 1 is not supposed to work in scripts.
How do I get J to wait for input from the keyboard?
cheers
Roelof
Contact information
Dr. Roelof K. Brouwer PEng
Professor
Department of Computing Science
School of Advanced Technologies and Mathematics
Thompson Rivers University
900 McGill Road, PO Box 3010
Kamloops, BC, Canada,V2C 5N3
skype RoelofBrouwer
telephone numbers
1-250 828 5219 work
1-250-374-5874 home
1-250-377-6133 fax
home page www.tru.ca/advtech/compsci/faculty/rbrouwer
email [EMAIL PROTECTED]
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm