This is simple compare tables. My purpose was not to compare each with function calls of FCOUNT(), FSIZE(), but a quick way to ensure that the tables are the same. This was developed to provide a check for an import routine. the process creates to arrays with AFIELDS(). After creating the 2 arrays of each table I compare the arrays. lstrcmpi compares two strings and is case sensitive. The first compare is the field count return of the AFIELDS().
Declare integer lstrcmpi in kernel32 String, String
if afields(emp,"exam") != afields(oldemp,"oldemp") wait window "tables are not the same" return else if lstrcmpi(oldemp,emp) != 0 wait window "fields are not the same" return endif endif