I dont really see what your friend means about a for loop in assembler being a data structure. A for loop in assembler (depending on what this means...) is only a handlful of ops and would probably employ a register as its "data-structure".
The only possible idea I have about your freinds point is that sometimes one wishes to treat code as data. And then you could have an algorithm which operates on that data (which is really code) Consider a compiler, it may indeed wish to treat a for loop as data, and modify it in a particular way. Until the code gets executed its still data. And maybe even later.
In a tongue-in-cheek way of thinking about it you could say that the algorithm part of a program is every instruction the cpu executes, and the data is everything else. This overlooks the difference between an algorithm and a heuristic, and when code is data and data is code, but whatever.
:-)
In reply to Re: Algorithms, Datastructures and syntax
by Anonymous Monk
in thread Algorithms, Datastructures and syntax
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |