# How can this done?

**URL:** https://discourse.julialang.org/t/how-can-this-done/4330
**Category:** General Usage
**Created:** [June 17, 2017, 7:40pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330 "2017-06-17T19:40:12Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![DrKrar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drkrar/32/3801_2.png) [@DrKrar](https://discourse.julialang.org/u/DrKrar)
#### Post date: [June 17, 2017, 7:40pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/1 "2017-06-17T19:40:13Z")

</div>

how can one ask for input from REPL (STDIN), waiting for some time then return any way if there is no input??

---

<div class="post-metadata">

### Author: ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)
#### Post date: [June 17, 2017, 7:43pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/2 "2017-06-17T19:43:10Z")

</div>

I answered a similar question here:

> [@Polling keyboard input looking for e.g. 'q' in a loop to 'gracefully' terminate execution](https://discourse.julialang.org/t/polling-keyboard-input-looking-for-e-g-q-in-a-loop-to-gracefully-terminate-execution/812):
>
> I have a main loop that continuously acquires camera frames and some digital signals and progressively stores all data using the HDF5 module. I want this loop to terminate when the user presses a single keyboard key, e.g. ‘q’, by ‘gracefully’ releasing all the open files and hardware resources. The key idea behind this loop is that it should never block or otherwise spend a significant amount of time executing a single statement. Ideally I want the time spent inside the loop body on all statemen…

---

<div class="post-metadata">

### Author: ![DrKrar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drkrar/32/3801_2.png) [@DrKrar](https://discourse.julialang.org/u/DrKrar)
#### Post date: [June 17, 2017, 7:54pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/3 "2017-06-17T19:54:16Z")

</div>

Dear @adamslc  
i ask for a some how different thing.  
if there is no input (a user to interact) after some time. return with a default value then.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [June 17, 2017, 8:07pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/4 "2017-06-17T20:07:22Z")

</div>

Instead of asking for input, just write functions for the user to call and pass in arguments.

---

<div class="post-metadata">

### Author: ![DrKrar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drkrar/32/3801_2.png) [@DrKrar](https://discourse.julialang.org/u/DrKrar)
#### Post date: [June 17, 2017, 8:09pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/5 "2017-06-17T20:09:48Z")

</div>

@dpsanders i want a default behavior in absence of a user who supposed to input to REPL.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [June 18, 2017, 1:27am UTC](https://discourse.julialang.org/t/how-can-this-done/4330/6 "2017-06-18T01:27:24Z")

</div>

In what kind of application or context?

---

<div class="post-metadata">

### Author: ![DrKrar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drkrar/32/3801_2.png) [@DrKrar](https://discourse.julialang.org/u/DrKrar)
#### Post date: [June 19, 2017, 7:06pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/7 "2017-06-19T19:06:44Z")

</div>

> [@dpsanders](#):
>
> In what kind of application or context?

during receiving input from REPL.  
thanks.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [June 19, 2017, 7:47pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/8 "2017-06-19T19:47:29Z")

</div>

If you’re receiving input from the repl, then there must be a user controlling everything, no?

---

<div class="post-metadata">

### Author: ![DrKrar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drkrar/32/3801_2.png) [@DrKrar](https://discourse.julialang.org/u/DrKrar)
#### Post date: [June 19, 2017, 7:53pm UTC](https://discourse.julialang.org/t/how-can-this-done/4330/9 "2017-06-19T19:53:41Z")

</div>

i want to give the user a time frame to respond else a default will apply.
