@Leah
The way to verify it in this example is by modifying the file with the 
function while the "timedwait" pauses the execution. In practice I modified 
the content of the println while the script was in timedwait.

The goal is to be able to modify functions without the need of restarting 
the script, which takes time compiling the imported modules and other 
functions/code from the program.

On Sunday, July 6, 2014 3:24:40 PM UTC-3, Leah Hanson wrote:
>
> I'm not sure why it behaves differently inside the while loop, but I'm 
> also not sure how you can tell, since the function foo is already defined?
>
> Maybe you could explain what your goal is. `include` basically pastes the 
> included file at the call site. Why are you re-including the same file 
> multiple times?
>
> -- Leah
>
>
> On Sun, Jul 6, 2014 at 2:48 AM, David A. <[email protected] 
> <javascript:>> wrote:
>
>> For instance:
>>
>> #### file test_func.jl:
>>
>> function foo()
>>     println("This is foo")
>> end
>>
>>
>> #### file test.jl:
>>
>> include("test_func.jl")
>> foo()
>> timewait(f, 10; pollint=1.0)
>> include("test_func.jl")
>> foo()
>>
>> while true
>>     include("test_func.jl")
>>     foo()
>> end
>>
>>
>>
>> Both foo() outside the while-loop work well reloading the function foo() 
>> from file test_func.jl , but the include inside the while-loop doesn't 
>> reload it. So I guess it's a matter of scopes. How to make an include 
>> inside a loop to reload it's contents as it does outside of loops?
>>
>
>

Reply via email to