|
On 26-Sep-2016 11:26 -0500, CRPence wrote:
On Wed, 31-Aug-2016 at 14:12, (WalzCraft) Jerry Forss wrote:
[…] Some of the values will be MLMD, MLDM and MLD.
So scanning for a value of MLD may give a false positive.
With the very simple example shown, the issue of a false-positive
is easily overcome by coding the selection to the actual size; i.e.
as 4-byte elements, a 3-byte value would be searched as the
blank-padded value. […]
Your caveat of "With the very simple example shown" is a pretty
significant one. If the value you are searching for happens to not
need any padding, then you run into the same issue with the
searched-for value possibly straddling two elements. Someone already
gave the much-easier-to-read example of an array whose element size
is 3 characters and whose actual contents are 'ABC', 'DEF', and
'GHI'; with a search for 'CDE' (properly padded with zero blanks)
resulting in a false positive. […]
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.