gettingstarted
[Top] [All Lists]

Re: InStr Problems

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: InStr Problems
From: Aubrey Todd <atodd at copper dot net>
Date: Sat, 29 May 2004 17:37:30 -0700
Delivered-to: gettingstarted at lists dot realsoftware dot com
List-help: <mailto:gettingstarted-request@lists.realsoftware.com?subject=help>
List-id: Getting Started <gettingstarted.lists.realsoftware.com>
List-post: <mailto:gettingstarted@lists.realsoftware.com>
References: <20040529065750 dot BAF7D1F3A83 at lists dot realsoftware dot com>
It is interesting to see what my symbols look like when they come back to me. I do not know where the '3D' or what it is doing in the code, it was not there when I sent it. The '=F7' should be the division symbol - a bar with a period above and below it (Option-forward slash on my keyboard). If you would like, I can attach my code to an e-mail and send it to you.

As Russ pointed out, I can program around the problem but as near as I can tell, it should work the way it is. If you change the InStr line to k=InStr(pp,Astr,")") and let pp count by two's, when it reaches the length of Astr + 3 or more, k will go to zero, of course, you need to test for k=0 to get out of the loop..

This is what I got back from the digest:
pbProceed.Action
  Dim Astr As String
  Dim pp As Integer

  Astr=3D"(=F7=F7)"
//Put a break here and step through the Debugger and watch the value=20=

of pp
  //Check for ')' in Astr
  pp=3D-1
  Do
    pp=3Dpp+2
    pp=3DInStr(pp,Astr,")")
  Loop Until pp=3D0

End Sub

If you are seeing the same thing then I probably need to send you my code as an attachment.

Here's what I did:

Created a new project
Dragged button onto window
Pasted your code in
Run
Click button, note it didn't go in an endless loop.

Is that not what you're seeing?

No, mine goes into an endless loop every-time!
-Jon


--
Jonathan Johnson
Testing Department
REAL Software, Inc.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>