Hi dear friends, Thanks for reading my Message,
I am a newbie.I don’t know why the Run button in Julia doesn’t work and I have to copy the code and paste it in REPL.
Is there any option I can solve my problem or an option like run by step in MATLAB in Julia??
The code actually runs but doesn’t print anything so you don’t see anything.
// Edit
It’s confusing because the line head julia>
does not appear again like in the REPL so it looks like nothing happened.
You may need to click somewhere inside the code to make that tab active before clicking Run will work. That may not be the issue in your case, but it is a quirk that sometimes gets me.
There are options to run line-by-line. See the documentation here.
If your code did run, then your variables will show up underneath the “Workspace” tab. Check there.
Another possible problem is that you haven’t saved your file. Save and Run are separated in Atom unlike Matlab. I install this package in Atom Settings, so I don’t have to worry about it.
Thanks for the response dear friend,
actually the end of the code has a plot order and when I copy it and paste it in REPL it works.
when I even use a simple order like print somthing still it doen’t work
I really apreciate the time you spnet and link you gave me. I have checked your suggestion already and I saved my code but still it doesn’t work.
I think it has something to do with my windows which is 10. I borrowed my friend’s loptop which has windows 7. I installed the same Julia and Atoms. In his loptop the Run button works properly.
Hmm, well you can try uninstalling and reinstalling the programs. They should work on Windows 10 too.
Before that though, I would like to confirm whether the program is not running or whether it is not printing anything. Can you add this line to your code: println("it ran")
and try again? You might need to place your plot command inside the display()
function to get it to appear.
Note that there is no “run button” in Julia - Julia is just a language. It looks like you are using Atom, next time you have an editor question, mention which editor you need help with.
I reinstalled it some weeks ago but it didn’t work . I used your code but it doesn’t work:(
you are right. I am sorry for the mistake. I should have mentioned the Atoms not julia:)
I don’t know what else to try to fix your bug. You might want to edit your original post and change the category to Tooling - Juno to get more expert attention. You could also open a GitHub issue here. Sorry I couldn’t help more.
thanks dear. You were so kind to me to give suggestions.
Best regards
Fwiw I’ve never used that button in my life - what happens if you just run code with Ctrl+Enter or Alt+Enter?
I did that but it also did not work.
Is your Julia session working ie can you use the REPL? What happens if you just type 2+2
in the REPL at the bottom and press enter? Also what happens if you type 2+2
(without the semicolon, you don’t need that when evaluating inline in juno) in your editor window, select that line of code and hit ctrl+Enter?
yeah yeah. it works, I usually copy my code and paste it in REPL and it runs.
when I type 2+2 without simocolon and press enter in REPL it shows 4. and the second way you said I did but it goes to next line.
If you’re open-minded to alternatives, you can try Visual Studio Code with the Julia extension, which works in a way very similar to Atom. That could be a quick way (if a bit lazy) to fix your problem.
Okay just to make sure I understand - when you put 2+2
into the editor window (at the top), put your cursor on that line and press Ctrl+Enter, the cursor jumps to the next line, but nothing happens in terms of evaluating 2+2 (i.e. you don’t get a little box saying 4
to the right)?
Also I should have asked this earlier, but are you using JuliaPro by any chance?
yeah exactly.
I am using Julia version 1.6.1
yeah :). exatly. I think I should have tried another IDE.
Thanks for the suggestion;)