I was wondering if it is possible to pass arguments to include("file.jl")
. For example we parse the ARGS in the file.jl
and use them in there. Similar to what we do in a command line by passing arguments.
相关问题
- How to start reading a file x bytes from the begin
- Dictionary help in Julia - creating dictionary fro
- Pass an updated function to an existing function
- Pythonic Way To Check for A Parameter Type
- Using parameters from BASH file name as arguments
相关文章
- Understanding immutable composite types with field
- If CancellationToken is a struct and is passed by
- Accessing variables in a function within a functio
- read into arrays in Julia
- Pass-by-value (StringBuilder vs String) [duplicate
- passing arguments in google apps script
- Can't pass a script block as a parameter to po
- Passing arguments into multiple match_fun function
Reassigning
ARGS
to makefile.jl
think it received arguments works, but leads to a warning (because it overwritesBase.ARGS
). A better methods perhaps is to useisdefined
to check for a different source of parameters before usingARGS
infile.jl
.For example, file
main.jl
would be:and
file.jl
would be:Now:
This also allows communicating deeper through several levels of inclusion.