How to handle ParseError when evaluating exponents (powers) in Julia

36 views Asked by At

I use Julia version 1.10.0. When evaluating power expressions such as 2^3, in REPL, Pluto or VScode, the exponent change immediately into a superscript and then get a ParseError with the information that the exponent (in this case, the number 3) is an unknown unicode character. I am new to Julia and I do not see how to handle this error. This happens to any expression containing a mathematical operation with a power.

julia> 2³
ERROR: ParseError:
# Error @ REPL[1]:1:2
2³
# unknown unicode character '3'
Stacktrace:
[1] top-level scope
@ none:1
julia>
1

There are 1 answers

0
ezyman On

The issue is related to Ubuntu and the Keyboard. The answer is to press the hat (caret) key twice in order to obtain the ^ effect. This answer is from https://askubuntu.com/questions/56560/what-exactly-is-meant-by-eliminate-dead-keys