The DO keyword.


The do keyword performs a simular function to while. Basicaly, it repeats a block of statements. Here is an example of the syntax:
        main()
        {
          int i=5;

          do
          {
            printf(" i is %d\n", i);
          }
          while(--i);
        }

The program result will look like this:
 		i is 5
 		i is 4
 		i is 3
 		i is 2
 		i is 1
The main difference between do and while is the time that expression is evaluated.

Examples:

Basic do.

See also:


Top Master Index Keywords Functions


Martin Leslie

b96786d68c2e63148ff3f22e6eb'>refslogtreecommitdiff

path: root/arch/mn10300/mm
diff options
context:
space:
mode:
authorAkira Takeuchi <takeuchi.akr@jp.panasonic.com>2010-10-27 17:28:45 +0100
committerDavid Howells <dhowells@redhat.com>2010-10-27 17:28:45 +0100
commit9731d23710736b96786d68c2e63148ff3f22e6eb (patch)
treeb3804df43f25ba8c8aaf1de94a98c0cb22f69d7e /arch/mn10300/mm
parent0bd3eb6ca772775da6125ea5b044d4257473d18d (diff)
MN10300: AM34: Add cacheflushing by using the AM34 purge registers
The AM34 CPU core provides an automated way of purging the cache rather than manually iterating over all the tags in the cache. Make it possible to use these. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/mm')