I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
Personal\\DFS/NHL\\Julia/code_for_Github.jl")
(I hope that was what you meant to do).

I got: *ERROR: UndefVarError: Include not defined*

On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:
>
>
>
> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sorry if Im not following - I tried:
>>
>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got *ERROR: 
>> syntax: invalid escape sequence*
>>
>
> Backslashes have to be escsped in strings, like in many computer 
> languages: change \ to \\ in the string.
>
> However, usually it is better to just run Julia from within the path that 
> you want rather than having to type absolute paths all of the time in the 
> REPL.
>
> (In the long run, you usually do large-scale code development in a module 
> in the standard module search path, so you can just type "using Foo".)
>
> (If you call include("foo.jl") from another file bar.jl, the path of 
> foo.jl is automatically relative to the path of bar.jl, so again you 
> neither need nor want absolute paths.)
>
> For interactive code development where I need more than a few lines of 
> code, I usually use a Jupyter notebook (google "IJulia").
>

Reply via email to