Does this file contain valid Julia statements? In which case just `include`
the file.
Say you have a file called config.txt in the current director with the
following text:
a=1
Then, on the REPL
julia> include("config.txt")
1
julia> a
1
If the statements are not valid Julia, then you'll have to implement your
own parser. You can read the contents of the file into a string use
`readall`
julia> x=readall("config.txt")
"a=1\n"
On Monday, 18 August 2014 06:33:37 UTC+1, Peter wrote:
>
> Suppose there is in Matlab a library that can read files with a certain
> extension, say .xyz, and instruct Matlab what to do. The file would contain
> instructions about dynamic systems with a certain number of variables,
> shocks and so on.
>
> Can I do the same thing in Julia and how?
>
> For example,
>
> Let's say I want to declare in a file with extension xyz a dynamic system
> with 2 equations:
> x = x(-1) + y^2;
> y = y(-1);
>
> Thank you!
>
>