view test/multi.c @ 880:5313ed059cee

no tabs in source
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 03 Apr 2014 10:43:01 +0900
parents c2c709727221
children
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("#0024: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("#0032: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("#0049: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("#0057:l %d %d = %d\n",i,j,b[i][j]);


    f(a);
}