Reputation: 17336
I'm just starting to learn Julia. I'm using JuliaBox (browser based session).
Seems like most of the shell commands (in BASH works) in Julia's shell.
But, I didn't get why in BASH Shell/Julia shell, it didn't print $c (in the example below) first time but it works later on (after I did some operation on $v variable). How's Julia shell processes this behavior?
PS: I know if I want to print $c first time, I have to use echo $((c))
Upvotes: 0
Views: 153
Reputation: 241988
This seems like the normal bash behaviour. ((...))
is used for arithmetic evaluation, without it, everything on the right hand side is a string. $((...))
does arithmetic expansion, which means it expands to the result of the arithmetic expression. See man bash
.
Upvotes: 3