User Variable Types

Posted:
Mon Apr 07, 2008 5:18 am
by rokstar553
Whats the difference between Integer, Real and String variables?
Re: User Variable Types

Posted:
Mon Apr 07, 2008 6:01 am
by DilloDude
An integer is like a whole number, with negatives. So it can be ...-2, -1, 0, 1, 2... and so on.
A real number contains decimals, so it can have fractions: 0.031, 192.6, 10.5 etc.
A string is a list of text or some such. So it can be "Hello!", "Bob" or something like that.
Re: User Variable Types

Posted:
Mon Apr 07, 2008 10:36 am
by Fuzzy
a string is really a array of type char, which is an 8 bit number from -128 to 127. It is often used to represent characters, which is where "char" comes from.
So in ge you make a string like so
char name[howmany];