SYS(2017)  Record Checksum Value
Visual FoxPro 9.0 SP2 
SYS(2017)  Record Checksum Value 
See Also 
Returns a checksum value based on the current record in the current work area. You can use a checksum to test the validity of data. You can also generate checksum values greater than 16 bits for large strings.
SYS(2017) offers complementary functionality to SYS(2007)  Checksum Value.
SYS(2017, cExpression [, nSeed [, nFlags]]) 
Parameters
 cExpression

Specifies a commadelimited list, with or without spaces, containing one or more fields to exclude from the checksum calculation. The maximum length of the field string is limited to 256 characters.
If cExpression is empty, Visual FoxPro does not exclude fields except for Memo and General fields.
 nSeed

Specifies a numeric seed value of 0 that is used to calculate the checksum and is included for backward compatibility. Passing a value of 1 for nSeed uses the default system value of 0. For CRC32 calculations, Visual FoxPro disregards nSeed.
 nFlags

Specifies additive bit values for generating the checksum.
Versions of Visual FoxPro earlier than 8.0 used a CRC16 16bit algorithm to calculate the checksum values of strings. Visual FoxPro now includes the CRC32 routine to calculate larger 32bit values. You can control the setting of this algorithm by setting the first bit value of the nFlags parameter.
The following table lists the bit values you can add to produce a value for nFlags.
Value Bits Description 1
001
Calculate checksum value using CRC32 checksum algorithm.
2
010
Include Memo fields in the checksum calculation.
You can use the second nFlags bit to include Memo fields in the CRC calculation. Visual FoxPro includes all Memo fields except any specified by cExpression in the calculation.
The following table lists the possible values for nFlags, produced by the sum of the bit flags.
nFlags Description 0
Calculate checksum based on cExpression parameter using CRC16 checksum algorithm. (Default)
1
Calculate checksum based on cExpression parameter using CRC32 checksum algorithm.
2
Calculate checksum based on current record contents including Memo fields using CRC16.
3
Calculate checksum based on current record contents including Memo fields using CRC32.
Return Value
Remarks
See Also
© , 19962020 • Updated: 11/10/20
Comment or report problem with topic