-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersideamacro-api
Description
Hey.
First of all, just upgraded to 0.5 and the improvements in code clarity thanks to the macro shorthands are awesome!
While translating my code, I tried inserting multiple local variables in a similar manner:
function localtest()
@tasks for i in 1:100
@local x = 0
@local y = 0.
x += i
y += i
println("x; $x, y: $y")
end
end
which throws an error:
ERROR: LoadError: The @local macro may only be used inside of a @tasks block.
Wrapping both calls in a @local begin ... end
block fixes it, but since documentation does not mention it and there are no examples, it might be good to either fix it or include it in the docs.
(though I see e.g. that Trapezoidal Integration example has multiple calls to local
that work - is this equivalent to the macro?)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersideamacro-api