thanks a lot guys :) Both solutions work!
Jim
On 24/05/13 20:42, Andy Fingerhut wrote:
Try adding (flush) after the print call.
On Fri, May 24, 2013 at 12:35 PM, Jim - FooBar();
<jimpil1...@gmail.com <mailto:jimpil1...@gmail.com>> wrote:
Hi everyone,
I am trying to do something very simple like asking the user
whether he wants to continue or not (a-la bash). However,
sometimes the print statement is printed sometimes it isn't! IN
other words sometimes I get the prompt ,sometimes it looks like
it's hanging (while in fact it's waiting for the user to type \y
or ) and it's printing the warning altogether with what the user
typed and the rest of the output...weird stuff!
(print " \u001B[31mYOU ARE PERFORMING A POTENTIALLY ILLEGAL
OPERATION...\n\t PROCEED AT YOUR OWN RISK!!!\u001B[m Proceed? (y/n):")
(when (-> *in*
(java.util.Scanner.)
.next
(.charAt 0)
(= \y))
any ideas?
Jim
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
<mailto:clojure@googlegroups.com>
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
<mailto:clojure%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- You received this message because you are subscribed to the
Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to clojure+unsubscr...@googlegroups.com
<mailto:clojure%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.