A for loop in ASM usually sets a counter in the beginning of the block and at the end of the block it checks counter's value and jumps to the start of the block if the for loop isn't finished yet. Where does your friend sees a data structure here? By declaring a data structure we declare a variable or a set of memory cells. There is no program execution involved in it.

In general you can say that in a programming language we have data and control structures. The for loop clearly belongs to the control structures, since it changes program execution path (a jump in ASM).

Such 'debates' are quite dangerous, once I was arguing with my co-worker about DOS. I was claiming that it's an operating system, no matter how simple. His point was that it's not an operating system. He said we should call BIOS an operating system then. And so we continued to argue on such a pointless thing till we started to treat each other like an enemy. Not so good. Might have been bad chemistry between us ;-)


In reply to Re: Algorithms, Datastructures and syntax by Heidegger
in thread Algorithms, Datastructures and syntax by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.