From: GS on
>> Yes, I see the difference! It's not the syntax I was referring to; it was
>> the concept of substituting "0" for '256' in MY CODE. Sorry for any
>> misunderstanding here, but I am NOT mistaken since I acknowledged yesterday
>> that your code (as posted) worked for that particular HexDigit, but when I
>> substituted "0" in MY CODE (as you implied) it did not work. That could
>> very well be because of my lack of knowledge in this area, and so in no way
>> was I inferring your code was bad. -I just didn't know enough at that point
>> about what I was into.
>>
>> Again, I thank you for your persistence and patience with trying to help
>> me. -Much appreciated!
>>
>> -- Garry
>>
>> Free usenet access at http://www.eternal-september.org
>> ClassicVB Users Regroup! comp.lang.basic.visual.misc
>>
>>
>
> It's just that the "0" is in the wrong place in you code. It should have
> been: Right("0" & Hex(CLng(v(i))), 2)
>
> Happy to be to any help :)
>
> /Henning

Thanks! I see that now

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


From: Derek on
On May 28, 6:35 pm, GS <gesan...(a)netscape.net> wrote:
> Sorry if I ignored your original reply
> but it seemed too daunting to get involved with converting it to VB6
> syntax.

Just to clarify, the original function was already a VB6 compatible
function and would not have needed any conversion. It could just have
been cut'n'pasted into a VB6 project. The only part of the code which
was not VB6 compatible was the test harness part. Still, no worries.
I'm glad that the newsgroup replies have been helpful and that you're
getting somewhere with the project.

Cheers

Derek
From: GS on
on 5/30/2010, Derek supposed :
> On May 28, 6:35�pm, GS <gesan...(a)netscape.net> wrote:
>> Sorry if I ignored your original reply
>> but it seemed too daunting to get involved with converting it to VB6
>> syntax.
>
> Just to clarify, the original function was already a VB6 compatible
> function and would not have needed any conversion. It could just have
> been cut'n'pasted into a VB6 project. The only part of the code which
> was not VB6 compatible was the test harness part. Still, no worries.
> I'm glad that the newsgroup replies have been helpful and that you're
> getting somewhere with the project.
>
> Cheers
>
> Derek

Thanks! After taking a closer look at it (now that the pressure for a
solution is off) I see that it's essentially what we ended up with. I'm
sure my first inclination was to abandon it for the brevity of Helmut's
solution. Also, I thought the extra stuff for the other languages would
need some attention that I wasn't willing to give at the time.

Your contribution to the project is very much appreciated!
regards,

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


From: Karl E. Peterson on
GS explained on 5/28/2010 :
> dpb explained :
>> GS wrote:
>> ...
>>
>>> Since the source string of Hex values are paired, a delimited version of
>>> this would be:
>>> "0E,0E,00,00,05,05,00,0C,20,45,01,64,A5,A5"
>> ...
>>
>> You didn't say that, now did you?
>>
>> See Helmut's function for one solution...
>>
>> The point to be made is unless you describe the problem accurately it's
>> highly unlikely to get a useful response. How was anybody to know from
>> your initial posting you had a composite list of 16-bit hex digits you
>> wanted to parse?
>
> Point taken, ..and thanks! Sorry for my lack of providing detail. I will be
> sure to provide more detail in future. I was hoping I would get enough
> examples to figure it out on my own based on a sample of handling a single
> Hex val.

You did. What you didn't quite manage was identifying what you were
*really* having trouble with. That being, specifically, breaking a
string up into bits and pieces.

Programming tasks are rarely confined to a single "problem" realm.
Almost always, you need to combine numerous methods to arrive at a
single solution to a complex problem composed of multitudes of little
trivial tasks.

So really, digging even deeper, the problem in this case was that you
couldn't identify the problem. That one's a hard one to work with.

--
..NET: It's About Trust! http://vfred.mvps.org
Customer Hatred Knows No Bounds at MSFT
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


From: GS on
Karl E. Peterson explained :
> GS explained on 5/28/2010 :
>> dpb explained :
>>> GS wrote:
>>> ...
>>>
>>>> Since the source string of Hex values are paired, a delimited version of
>>>> this would be:
>>>> "0E,0E,00,00,05,05,00,0C,20,45,01,64,A5,A5"
>>> ...
>>>
>>> You didn't say that, now did you?
>>>
>>> See Helmut's function for one solution...
>>>
>>> The point to be made is unless you describe the problem accurately it's
>>> highly unlikely to get a useful response. How was anybody to know from
>>> your initial posting you had a composite list of 16-bit hex digits you
>>> wanted to parse?
>>
>> Point taken, ..and thanks! Sorry for my lack of providing detail. I will be
>> sure to provide more detail in future. I was hoping I would get enough
>> examples to figure it out on my own based on a sample of handling a single
>> Hex val.
>
> You did. What you didn't quite manage was identifying what you were *really*
> having trouble with. That being, specifically, breaking a string up into
> bits and pieces.

Karl, I don't have any problems with parsing strings. The problem I did
have was how to construct the HexString from the DecString since my
client was inferring the conversion was the other way around. In either
case, coding for this had me at a loss because this got done via VBA
using Excel functions.

At the start of this project, the client had me looking to convert the
HexString to a DecString. Later they inform me that they already have
the HexString and wanted me to provide a way to duplicate it FROM a
DecString. -Confusing to say the least! I didn't know they were trying
to reverse engineer someone else's work. I suspect they were just
testing to see if I would come up with the same DecString they already
had before taking things further. What I suspect is that they were
having trouble following the oem's instructions on how to write the
DecString used to generate the HexString. Fortunately, Mike raised his
issue at exactly the right moment.
>
> Programming tasks are rarely confined to a single "problem" realm. Almost
> always, you need to combine numerous methods to arrive at a single solution
> to a complex problem composed of multitudes of little trivial tasks.

So true. I've learned that well from studying many of your coding
examples. I can't tell you enough how much I appreciate your
contribution to my VB6 learning process!
>
> So really, digging even deeper, the problem in this case was that you
> couldn't identify the problem. That one's a hard one to work with.

No kidding! Doesn't help much either when the client doesn't know how
to communicate the problem. IMO, they got me involved too early; they
should done their homework fully before dragging me into it. I suspect
they were hoping I'd offer some R&D suggestions but that's kind of hard
to do when I'm hundreds of miles away.

Anyway, some contributors to the solution want me to update with how it
turns out in the real-world application. I'm sure the client only got
me involved because this project is a perfect fit as a 'Plugin'
compliment to my CNC files manager app.

Once again, I apolgize to everyone for the bits & dribbles of info, but
that's how it came to me. My bad regardless, considering I know the
client well enough that I should have suspected I wasn't been told
everything in the first place. <Grrr!>I hate when that happens...

regards,

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc