What does Theses "Loops" Means?
#1

What does this loop means?

1)
PHP код:
enum USER_DATA
{
    
USER_ID,
    
USER_NAMEMAX_PLAYER_NAME ],
    
USER_PASSWORD129 ],
    
USER_ADMIN,
    
boolUSER_LOGGED_IN
};
new    
UserMAX_PLAYERS ][ USER_DATA ];
public 
OnPlayerConnectplayerid )
{
    for( new 
i_USER_DATA; ++Userplayerid ][ USER_DATA] = 0;
    
// ...
    
return 1;

2)
PHP код:
stock DB_Escape(text[])
{
    new
        
ret[802],
        
ch,
        
i,
        
j;
    while ((
ch text[i++]) && sizeof (ret))
    {
        if (
ch == '\'')
        {
            if (
sizeof (ret) - 2)
            {
                
ret[j++] = '\'';
                
ret[j++] = '\'';
            }
        }
        else if (
sizeof (ret))
        {
            
ret[j++] = ch;
        }
        else
        {
            
j++;
        }
    }
    
ret[sizeof (ret) - 1] = '\0';
    return 
ret;

Can anyone tell me that what does these both loops mean?
as I'm not able to understand them.
Reply


Messages In This Thread
What does Theses "Loops" Means? - by TheRaGeLord - 19.07.2015, 14:20
Re: What does Theses "Loops" Means? - by Vince - 19.07.2015, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)