ERROR: syntax: unexpected semicolon in tuple around REPL

WalterMadelim
Wed, 28 May 2025 07:49:34 +0000
General Usage

Why can’t I write this compound expression? (The context is a Givens rotation)

julia> A = rand(-9:9, 2, 2)
2×2 Matrix{Int64}:
 -9  -9
 -1   1

julia> t = pi/3
1.0471975511965976

julia> c, s = cos(t), sin(t); [c s; -s c] * A
2×2 Matrix{Float64}:
 -5.36603  -3.63397
  7.29423   8.29423

julia> (c, s = cos(t), sin(t); [c s; -s c] * A)
ERROR: syntax: unexpected semicolon in tuple around REPL[4]:1
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

5 posts - 4 participants

Read full topic