in reply to Re^4: CRC of a string
in thread CRC of a string
Also note that you define the calcChecksum32 function with a () prototype for an empty argument list, then invoke the function (with an argument!) with the & sigil, which causes any prototype to be ignored. A good rule is to avoid prototypes unless you understand exactly how they work; most programmers, especially those from a C/C++ background, simply don't.
It is also good practice to avoid using the & sigil when invoking functions, using, e.g., calcChecksum32($string) instead. Among other things, this will allow prototypes, if you ever do use them, to actually have some effect! See perlsub for info on prototypes, subroutine invocation, etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: CRC of a string
by Dirk80 (Pilgrim) on Nov 27, 2009 at 10:36 UTC |