view test/multi.c @ 691:25115b50d033

*** empty log message ***
author kono
date Wed, 10 Oct 2007 17:58:15 +0900 (2007-10-10)
parents e9622935a621
children c2c709727221
line wrap: on
line source
#ifndef INLINE
#define INLINE
#endif

int printf(const char *,...);

#define LEN0 10
#define LEN1 9

typedef int ARRAY[LEN0][LEN1];

int a[LEN0][LEN1];

INLINE int
f(ARRAY a)
{
    int i,j;
    int b[LEN0][LEN1];

    j = a[1][1];
    j = b[1][1];

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    printf("f %d %d = %d\n",i,j,a[i][j]);

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    b[i][j] = i*100 + j;

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    printf("fl %d %d = %d\n",i,j,b[i][j]);
}

int
main()
{
    int b[LEN0][LEN1];

    int i,j;
    j = a[1][1];

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    a[i][j] = i*100 + j;

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    printf("m %d %d = %d\n",i,j,a[i][j]);

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    b[i][j] = i*100 + j;

    for(i=0;i<LEN0;i++) 
	for(j=0;j<LEN1;j++) 
	    printf("l %d %d = %d\n",i,j,b[i][j]);


    f(a);
}