License Plate System
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
So no! There was a discussion about this recently here:

pawn Код:
static const
    sLetters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    sNumbers[] = "0123456789";

#define RND(%0) %0[random(sizeof (%0))]

new
    str[6] =
        {
            RND(sLetters),
            RND(sLetters),
            RND(sNumbers),
            RND(sNumbers),
            RND(sNumbers),
            '\0'
        };

#undef RND
Sorry, I'm no pro >.<
Thank you for showing me wrong though. *learning in progression*

EDIT: ******, can you please explain why use use static and const for the letters and numbers?
I know static sorta remembers the value or something like that (cba to "explain" what I think), but what does const do? I could ****** it or search through pawn-lang, but I believe (after som experience) that you are able to explain better than the PDF.
Ty in advance
Reply


Messages In This Thread
License Plate System - by sTeAlthy [Brandon Brown] - 06.09.2010, 08:09
Re: License Plate System - by LarzI - 06.09.2010, 09:03
Re: License Plate System - by LarzI - 06.09.2010, 11:00
Re: License Plate System - by LarzI - 06.09.2010, 12:04
Re: License Plate System - by sTeAlthy [Brandon Brown] - 06.09.2010, 17:54
Re: License Plate System - by LarzI - 06.09.2010, 17:57

Forum Jump:


Users browsing this thread: 1 Guest(s)