"int" and "string"
Posted:
Sun Nov 11, 2007 8:39 pm
by asmodeus
How do I use "int" in the script editor and a variable, which is a string and what is the different from integer/real?
Re: "int" and "string"
Posted:
Sun Nov 11, 2007 8:52 pm
by Rux
Int is a non saved var maker. For example
- Code: Select all
int var;
var = 0;
if(saved-var == 1)
{
var = 1;
}
Re: "int" and "string"
Posted:
Mon Nov 12, 2007 12:34 am
by Game A Gogo
"int" is not a non-saved var maker.
If you use int, it will declare an integer, if its in a script, it will be only usable in that script, if its in the global script, it will be used everywhere.
int can only hold whole number
if you want precision, float or double would be required.
and to declare a string, it would be "char*name;" or a limited string "char name[256];"
Re: "int" and "string"
Posted:
Mon Nov 12, 2007 9:53 am
by Fuzzy
Float or double can be inprecise. Very small or very large numbers may not be accurate.
A char is actually an short unsigned int. So a string is actually a array of 8 bit integers.
Re: "int" and "string"
Posted:
Mon Nov 12, 2007 11:39 pm
by Rux
Fuzzy wrote:Float or double can be imprecise. Very small or very large numbers may not be accurate.
A char is actually an short unsigned int. So a string is actually a array of 8 bit integers.
I see those letters like this: Bla or bla can be bla. Very small or very large numbers may not be accurate.
A bla is actually an short bla bla. So a bla is actually is a bla of 8 bit blas. XD (Note: This is only a joke not a message saying I don't know these words.)