
Calcula um CRC - Cyclic Redundancy Code (Código de Redundância Cíclica) de uma string e retorna um número/resultado. SintaxeParâmetrosNome | Tipo | Descrição | Obrigatório | Referência |
---|
cString | caractere | Indica a string da qual será calculado um CRC32. | X |
|
RetornoNome | Tipo | Descrição |
---|
nRet | numérico | Retorna um número inteiro, com até 10 dígitos, que corresponde ao CRC da string informada no parâmetro cString. |
Observações- Strings iguais retornam CRCs iguais. Porém, nem sempre strings diferentes retornam CRCs diferentes.
ExemplosUser Function teste()
// Lê o arquivo lista.txt, no ambiente do servidor, e calcula o CRC.
cString := memoread('\lista.txt')
nCRC1 := MSCRC32(cString)
MsgStop('CRC = '+str(nCRC1,10))
Return
|
AbrangênciaAdvanced Protheus 6.09 , Advanced Protheus 7.10 , Microsiga Protheus 8.11 , Protheus 10 , TOTVS Application Server 10 , ByYou Application Server Veja também |