>Hi All,
>
>The length of sys(2007) is 5 numbers. I'd like to convert this into a character string of alphabetic letters (A-Z), in order to get rid of some positions. I can write the algorithm, but perhaps someone else already wrote one?!
Why not simply use int(val(sys(2007,"whatever"))) ? Thats 4 Bytes.
And you could also generate the better CRC32.
Or do you want to make this part of a serial number so you can check it's valid? Transform it to letters so users will save typing some chars?
On a side note:
You surely also know sys(2017) - did you know you can influence it by SET FIELDS ?
As learned by Anders Altberg about two weeks ago:
CREATE CURSOR curCRC (cTest C(8))
INSERT INTO curCRC VALUES ("whatever")
? SYS(2017)
SET FIELDS TO cTest = UPPER(cTest)
? SYS(2017)
Making checks on the basis of checksums at least when usind Sys(2017) should take this into account.
Bye, Olaf.