The following code (part of ModiaMath.jl) fails on 0.7:
julia> @static if VERSION < v"0.7.0-DEV.2005"
print(" \# ")
else
print(" # ")
end
ERROR: syntax: invalid escape sequence
Any idea?
The following code (part of ModiaMath.jl) fails on 0.7:
julia> @static if VERSION < v"0.7.0-DEV.2005"
print(" \# ")
else
print(" # ")
end
ERROR: syntax: invalid escape sequence
Any idea?
This is not valid
"\#"
If you want to print the original, just use raw string
raw"\#"
It seems that in v0.6, \#
just means #
, didn’t figure out why this become invalid in v0.7.
Thanks!
Just note a typo above. The r"\#"
creates a regex expression. For a raw string, you need to enter raw"\#"
.
Indeed, good catch.
oops, thanks!