TaoBase* TaoArithNode::getResult()
{
	if(arithType==0){
		return getString();
	}else if(arithType==1){
		return getNumber();
	}else if(arithType==2){
		return getComplex();
	}else if(arithType==3){
		return comArray;
	}else if(arithType==4){
		return byteArray;
	}else if(arithType==5){
		return shortArray;
	}else if(arithType==6){
		return intArray;
	}else if(arithType==7){
		return floatArray;
	}else if(arithType==8){
		return doubleArray;
	}
	return 0;
}
double PLCValueString::getImaginary(){
    return getComplex().imag();
}
double PLCValueString::getReal(){
    return getComplex().real();
}
void TaoArithBase::printComplex( ostream *out )
{
	complx=getComplex();
	complx->print(out );
}