Is there a way to modify a variable that was defined outside a function? Its not that important but it could be useful in some cases. Or maybe I approach this in a wrong way.
#let total_hours = 0
#let work(hours) = {
total_hours = total_hours + hours
[#hours hours]
}
#table(
columns: (auto, 1fr, auto),
inset: 5pt,
[*Name*], [*Desc*], [*Time*],
"Work 1", "Work 1 desc", work(3),
)
Total hours: #total_hours
Is there a way to modify a variable that was defined outside a function? Its not that important but it could be useful in some cases. Or maybe I approach this in a wrong way.
For example: