bobertlo / gmars

Go implementation of CoreWar MARS simulator
MIT License
3 stars 1 forks source link

implement FOR macro symbol concatenation #65

Open bobertlo opened 1 week ago

bobertlo commented 1 week ago

In other simulators, you can append the count variable onto labels and references defined inside the loop. Without this feature labels are not able to be used inside loops with more than one iteration because they will create duplicate symbols.

For example, the symbol start&i would be expanded to start01, start02, and so on.

See versions of Impfinity for an example in a real warrior.