Help Understanding Array Lenght
#7

Kind of, yes. There is no actual string datatype in PAWN unlike some other languages, you must use arrays for that purpose.

Check out the below example, I've used 3 different methods to print the same character. (a)
There may be more.

pawn Код:
new c = 97,  // ASCII code for 'a'

         a[1] = 'a',    // Direct array assignment

         holder = 'a';  // Direct

main() {

printf("%c", c);
printf("%c", a);
printf("%c", holder);

}
If you don't know what %c does in printf, check this page out. It is a specifier for printing characters.
Reply


Messages In This Thread
Help Understanding Array Lenght - by iSteve - 07.04.2014, 07:22
Re: Help Understanding Array Lenght - by Mriss - 07.04.2014, 07:52
Re: Help Understanding Array Lenght - by iSteve - 07.04.2014, 07:53
Re: Help Understanding Array Lenght - by Mriss - 07.04.2014, 07:56
Re: Help Understanding Array Lenght - by RajatPawar - 07.04.2014, 08:00
Re: Help Understanding Array Lenght - by iSteve - 07.04.2014, 08:03
Re: Help Understanding Array Lenght - by RajatPawar - 07.04.2014, 08:11
Re: Help Understanding Array Lenght - by iSteve - 07.04.2014, 08:15

Forum Jump:


Users browsing this thread: 1 Guest(s)