Finger problems

Finger problems

Actually finger v brain problems – the brain knows what I want to do but the fingers type something else.

In my defence I have been working in C# quite a lot and the mistake was in VB6 where the syntax is (quite) a bit different.

I was using ‘HRPEND’ as an end marker in a buffer filled at run time from a resource file and iterating through the buffer carrying out some action for each read until the current read contained the marker, so what did I do

        If InStr(PartUnderTest, "HRPEND") <> 0
                Do the work
        End If

For those non programmers out there the ‘InStr’ command returns the start position of the second string (group of characters), in this case ‘HRPEND’ in the first string and returns 0 if its not found. It doesn’t take a genus to work out that the work would only be done when HRPEND was actually found which is the total opposite of what I intended.

So I am putting this up here as a reminder to be more careful

This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s