initialization data exceeds declared size
#8

Quote:
Originally Posted by MP2
Посмотреть сообщение
You can't have strings and integers in the same array unless you use an enum(erator):
PAWN is a typeless 32bit language. the compiler doesn't give 2 pennies whether or not it's a string or an integer, all it needs to know is each cell retains a 32 bit value.

pawn Код:
{
    new
        array[7] = "hello"
    ;
   
    array[6] = 10;
   
    for(new i = 0; i < 6; i++)
    {
        printf("%c", array[i]);
    }
   
    printf("%d", array[6]);
    printf("%s", array);
}
Код:
output:

h
e
l
l
o
10
hello
Reply


Messages In This Thread
initialization data exceeds declared size - by Windrush - 06.01.2013, 04:51
Re: initialization data exceeds declared size - by InActtive™ - 06.01.2013, 05:52
Re: initialization data exceeds declared size - by Dusan01 - 06.01.2013, 06:16
Re: initialization data exceeds declared size - by MP2 - 06.01.2013, 06:20
Re: initialization data exceeds declared size - by Windrush - 06.01.2013, 07:59
Re: initialization data exceeds declared size - by InActtive™ - 06.01.2013, 08:03
Re: initialization data exceeds declared size - by Windrush - 06.01.2013, 08:52
Re: initialization data exceeds declared size - by u3ber - 06.01.2013, 13:01

Forum Jump:


Users browsing this thread: 6 Guest(s)