You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For loops cannot be defined presently, because there is no longer a way to pass down a variable name to be updated. Here is a naive definition:
for Var in Low..High loop Body ->
Var := Low
while Var <= High loop
Body
Var := Var + 1
This does not work because Var will be passed as a reference and correctly evaluated everywhere except in assignments. So Var+1 will evaluate the input variable plus one. But Var := Low will create a local variable name Var since none exists.
Still thinking about the right way to do that. One option is to simply modify := when assigning to a reference. Another is to have some kind of special reference type.
The text was updated successfully, but these errors were encountered:
For loops cannot be defined presently, because there is no longer a way to pass down a variable name to be updated. Here is a naive definition:
This does not work because
Var
will be passed as a reference and correctly evaluated everywhere except in assignments. SoVar+1
will evaluate the input variable plus one. ButVar := Low
will create a local variable nameVar
since none exists.Still thinking about the right way to do that. One option is to simply modify
:=
when assigning to a reference. Another is to have some kind of specialreference
type.The text was updated successfully, but these errors were encountered: