You can compare two tables with the same variables without keys in the following way:
main.m487 chars13 lines
Here we first create two example tables (T1 and T2). Then, we sort both tables by their variable names to put them in the same order. Finally, we use the isequal
function to check if the sorted tables are identical. If they are, we print a message that the tables are equal. If they are not, we print a message that the tables are not equal.
gistlibby LogSnag