void	Print( int );
void	Print( float );
void	Print( string );
void	Print( bool );




int	getDouble( int n )
{
	return n*n;
}

float	getDouble( float f )
{
	return f*f;
}

float	TestFloat( float f1, float f2 )
{
	return f1 * f2;
}

float	TestFloat( float f1, float f2, float f3 )
{
	return f1 * f2 * f3;
}

float	TestFloat( float f1, float f2, float f3, float f4 )
{
	return f1 * f2 * f3 * f4;
}

void	TestArith()
{

	Print( "--------변수 사칙연산 테스트---------" );
	
	int iint1 = 0X0ecd;//54434;
	int iint2 = 1840;

	Print( iint1 );

	int iint3 = iint1 + iint2;
	Print( iint3 );
	Print( iint1 - iint2 );
	iint3 = iint1 * iint2;
	Print( iint3 );
	iint3 = iint1 / iint2;
	Print( iint3 );
	iint3 = iint1 % iint2;
	Print( iint3 );

	Print( iint3++ );
	Print( iint3-- );
	Print( ++iint3 );
	Print( --iint3 );

	Print( iint3 += iint1 );
	Print( iint1 - iint3 );
	Print( iint3 -= iint1 );
	Print( iint3 *= iint2 );
	Print( iint3 /= iint2 );
	Print( iint3 %= iint1 );
}

void	ScriptMain()
{
	float 	f1 = 0.43521;
	float 	f2 = 98.3145;
	int 	i1 = 4352;
	int	i2 = 986214;
	bool	b1 = true;
	bool	b2 = false;
	string 	str1 = "str1이지롱~";
	string 	str2 = "str2지롱롱~~";

	Print( "--------string 테스트--------" );
	string	str3;
	Print( str3 = str1 );

	str3 = i1;
	Print( str3 );

	Print( str3 = f1 );

	str3 = b1;
	Print( str3 );

	str3 = "크크크 ";

	str3 += str2;
	Print( str3 );

	str3 += i2;
	Print( str3 );

	str3 += f2;
	Print( str3 );

	str3 += b2;
	Print( str3 );

	Print( str1 + str2 );
	Print( str1 + i1 );
	Print( str1 + f1 );
	Print( str1 + b1 );
	Print( str2 + str1 );
	Print( i2 + str2 );
	Print( f2 + str2 );
	Print( b2 + str2 );

	str3 = str1 == str2;
	Print( str3 );
	str3 = str1 == "str1이지롱~";
	Print( str3 );
	str3 = str1 != str2;
	Print( str3 );


	Print( "-------Init Declaration 테스트-------" );

	string sstr1 = str1;
	Print( sstr1 );
	string sstr2 = i1;
	Print( sstr2 );
	string sstr3 = f1;
	Print( sstr3 );
	string sstr4 = b1;
	Print( sstr4 );
	string sstr5 = str1 + str2;
	Print( sstr5 );
	string sstr6 = str1 + i2;
	Print( sstr6 );
	string sstr7 = str1 + f2;
	Print( sstr7 );
	string sstr8 = str1 + b2;
	Print( sstr8 );

	string sstr9 = i1 + str2;
	Print( sstr9 );
	string sstr10 = f1 + str2;
	Print( sstr10 );
	string sstr11 = b1 + str2;
	Print( sstr11 );

	string sstr12 = str1 == "str1이지롱~";
	Print( sstr12 );
	string sstr13 = str1 != str2;
	Print( sstr13 );
	string sstr14 = str2 == "크크크";
	Print( sstr14 );

	Print( "-------Float 사칙연산 테스트--------" );
	Print( f1 + f2 );
	Print( f1 - f2 );
	Print( f1 * f2 );
	Print( f1 / f2 );
	Print( ++f1 );
	Print( --f1 );
	Print( f1++ );
	Print( f1-- );
	Print( f1 );
	Print( f1 += f2 );
	Print( f1 -= f2 );
	Print( f1 *= f2 );
	Print( f1 /= f2 );

	Print( "-------------배열 테스트------------" );

	int	arrInt[] = { 2145, 124765, 7568, 7824, 23562351 };
	float	arrFloat[] = { 0.325, 85.235, 82.3523, 325.1216 };
	bool	arrBool[] = { true, false, true, str1!=str2 };

	int i = 0;

	for( i = 0; i < 5; i++ )
		Print( arrInt[i] );

	i = 0;
	while( i < 4 )
	{
		if( i == 2 )
		{
			i++;
			continue;
		}
		Print( arrFloat[i++] );
	}

	for( i = 0;; i++ )
	{
		if( i >= 4 )
			break;
		string strTemp;
		strTemp = arrBool[i];
		Print( strTemp );
	}


	string 	arrStr[] = { "str1메렁", "str2크크", "str3주글래?"
				, "str4씨뱅이", 425346, 4125.5636, true, str1 };


	for( i = 0; i < 8; i++ )
		Print( arrStr[i] );


	if( arrInt[0] != 2145 )
	{
		Print( "바보" );
	}
	else
	{
		TestArith();
	}


	switch( arrInt[1] )
	{
	case 2145 :
		Print( "2145지롱~" );
		break;
	case 124765 :
		Print( "124765지롱~" );
	case 7568 :
		Print( "7568이지롱~" );
		break;
	case 7824 :
		Print( "7824지롱~" );
		break;
	case 23562351 :
		Print( "23562351이지롱~" );
		break;
	default :
		Print( "default지롱~" );
	}

	Print( getDouble( 10 ) );
	Print( getDouble( 4.4 ) );
	Print( true );
	Print( false );
}


