[Gambas-user] Test Module, First try

Brian G brian at westwoodsvcs.com
Sun Jul 26 22:42:05 CEST 2020


Your method works very well as long as the number of entries, in both tables match but as soon as they don't, it throws an error and ends, I want to print out the full comparison to see what was actually delivered and what entries don't match.

Thank You
Brian G

----- Original Message -----
From: "Christof Thalhofer" <chrisml at deganius.de>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Sunday, July 26, 2020 11:48:50 AM
Subject: Re: [Gambas-user] Test Module, First try

Btw: I saw something I do not recommend for testing situations.

You used 'Try' together with 'If Error Then'. I can only say that I have
a bad feeling with that. Because at minimum Error should be cleared
afterwards with Error.Clear, which does not happen in your code.

I add a version of the function CompareStringArray to show that the same
can be achieved without 'Try' through the nice (or ugly depending on the
view) trick:

bResult = sA[i] = sB[i]

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur


----[ http://gambaswiki.org/wiki/doc/netiquette ]----


More information about the User mailing list