예제 #1
0
void DumpLiteral(SQObjectPtr &o)
{
	switch(type(o)){
		case OT_STRING:	scprintf(_SC("\"%s\""),_stringval(o));break;
		case OT_FLOAT: scprintf(_SC("{%f}"),_float(o));break;
		case OT_INTEGER: scprintf(_SC("{") _PRINT_INT_FMT _SC("}"),_integer(o));break;
		case OT_BOOL: scprintf(_SC("%s"),_integer(o)?_SC("true"):_SC("false"));break;
		default: scprintf(_SC("(%s %p)"),GetTypeName(o),(void*)_rawval(o));break; break; //shut up compiler
	}
}
예제 #2
0
void DumpLiteral(SQObjectPtr &o)
{
	switch(type(o)){
		case OT_STRING:	printf("\"%s\"",_stringval(o));break;
		case OT_FLOAT: printf("{%f}",_float(o));break;
		case OT_INTEGER: printf("{" OTTD_PRINTF64 "}",_integer(o));break;
		case OT_BOOL: printf("%s",_integer(o)?"true":"false");break;
		default: printf("(%s %p)",GetTypeName(o),(void*)_rawval(o));break; break; //shut up compiler
	}
}