float this->CharToFloat(string)
int this->CharToInt(string)
string this->FloatToChar(float)
string this->IntToChar(int)
int this->FloatToInt(float)
float this->IntToFloat(int)

(Caronte Pcode version 2.0)

Description


Casting from type

Example.

Source:

CS_ANTISPAM_SCRIPT this = new CS_ANTISPAM_SCRIPT($_this);

int A = 1;
int B = "230";
float C = 3.03;

this->Print(this->Format("A: %s\n",this->IntToChar(A)));
this->Print(this->Format("A: %.3f\n",this->IntToFloat(A)));
this->Print(this->Format("B: %.3f\n",this->CharToFloat(B)));
this->Print(this->Format("B: %d\n",this->CharToInt(B)));
this->Print(this->Format("C: %d\n",this->FloatToInt(C)));
this->Print(this->Format("C: %s\n",this->FloatToChar(C)));


Out:

A: 1
A: 1.000
B: 230.000
B: 230
C: 3
C: 3.03