Notice
Recent Posts
Recent Comments
Link
«   2026/02   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Tags
more
Archives
Today
Total
관리 메뉴

기억보다 기록을

Julia - conditional operators 본문

Julia

Julia - conditional operators

쿠키아버님 2022. 2. 11. 11:02
julia> a>0 && println("a is positive!")
a is positive!

julia> b<0 && println("b is negative!")
false

julia> b==3 || println("b is not 3")
b is not 3

a && b :  a가 true일 경우에 b를 계산. a가 false인 경우 return 값은 false

a || b : a가 false일 경우에 b를 계산. a가 true인 경우 return 값은 true

 

 

참고 문헌

https://riptutorial.com/julia-lang/example/15211/short-circuit-operators-----and---

 

Julia Language Tutorial => Short-circuit operators: && and ||

Learn Julia Language - Short-circuit operators: && and ||

riptutorial.com