Skip to content

change do loops to for <var> do loops #9

@mjvesa

Description

@mjvesa

The current do form is from Forth. There are implicit loop counter variables (i,j,k etc..) that can be used to get the current value of the counter. Using the following form:

100 1 for x do 
  ..
loop

we can get rid of the implicit counters and probably remove the whole concept of the return stack from the language. The for and do parts allow capturing the variable rather simply and remodeling the loop in infix and other formats using the usual evaluation techniques.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions