view test/simp.c @ 560:d6ff45d719a5 string-shared

string sharing
author kono
date Sat, 07 Jan 2006 18:11:53 +0900
parents 492f06738550
children 2dee957ef988
line wrap: on
line source

#include "stdio.h"


float f = 3;
float g = 4096.0f;

int kk = {-3};

int
main2(int i)
{
    i+=f;
    return +i;
}

int
alpha(c)
char c;
{
     return(('a'<=c&&c<='z')||('A'<=c&&c<='Z')||c=='_');
}
char ch;

void main1();
int main0() ;

int
main(int ac,char *av[]) 
{
    int i;

    printf("#0031:%d\n",ac);
    for(i=0;i<ac;i++) {
	printf("#0033:%s\n",&av[i][3]);
    }
    ch = 'E';
    main1(-8);
    printf("#0037:%d\n",main2(3));
    return main0(ac,ch,av);
}

int
main0(ac,ch,av) 
int ac;
char ch;
char *av[];
{
    int i;
    printf("#0048:%d %c\n",ac,ch);
    for(i=0;i<ac;i++) {
	printf("#0050:%s\n",&av[i][3]);
    }
    printf("#0052:%d==1\n",alpha(ch));
    return 0;
}

void
main1(int l)
{
   printf("#0059:%d\n", ((l+0)<-511||(l+0)>511));
   if ((l+0)<-511||(l+0)>511) printf("#0060:yes\n");
   l = -1;
   printf("#0062:%d\n", l==-1? 555:333);
}