Julia Programming Language
While loop, variable not defined
New to Julia
nicoo-c
June 5, 2022, 7:19pm
5
Solved with:
i = 0 while i < 10 global i += 1 println(i) end
2 Likes
show post in topic
Related topics
Topic
Replies
Views
Activity
Variable scope in while loops
New to Julia
question
4
7819
October 10, 2018
Do I have to add a `global` before the counting variable in the `while` loop?
General Usage
question
8
559
May 29, 2023
While loop and UndefVarError
New to Julia
question
2
415
January 6, 2021
While loop doesn't inherit variable from global scope in 1.0
New to Julia
6
2000
August 26, 2018
UndefVarError on loop iterator in while loop
General Usage
3
6340
November 3, 2018