BBS: Inland Empire Archive Date: 06-15-93 (21:56) Number: 326 From: QUINN TYLER JACKSON Refer#: NONE To: TONY MACE Recvd: NO Subj: Help With CRC! Conf: (2) Quik_Bas
TM>Hello All! TM>Help, I am trying to write a util that needs to calc a CRC TM>of a user name and return it as a string so I can use it TM>with a filename for access. For example the mail program TM>calcs 'FD459DBB' for 'TONY MACE'..... TM>I have routines to calc 32bit CRC but when I convert it to TM>a HEX var I get something completly different..... TM>What am I doing wrong..... Tony: To get an 8 byte name from a 32 bit CRC, do this: HEXNAME$ = HEX$(NOT CRC(NameString$)) The NOT turns it into an 8 byte string, no matter what the CRC happens to be. Without the NOT, you get variable length file names from the string. Cheers.... Quinn $$ * OLX 2.1 TD * I jumped the chasm that's ASM, and swam the sea that's C. --- Maximus/2 2.01wb * Origin: The Nibble's Roost, New Westminster BC 604-526-7686 (1:153/918)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET