Interesting...
I just tried a copy of your code, with minor modifications as below,
and it works ok as the content of a pushbutton. First time around, pp =
4, e = 1. Next pp=0, e = 1. Then it is done.
RB 5.5.2, Mac OS 10.3.4
Russ
======================
Dim Astr As String
Dim pp As Integer
dim e as integer
Astr="(÷÷)"
pp=-1
Do
pp=pp+2
e = e +1
pp=InStr(pp,Astr,")")
msgbox str(pp) + " " + str(e)
Loop Until pp=0 or e > 10
=============================
On May 28, 2004, at 8:20 PM, Aubrey Todd wrote:
Sorry Joe, you are correct, it would go to '0' for you. There was
another change being made that I overlooked. I created a new program
with a single button to run this code:
pbProceed.Action
Dim Astr As String
Dim pp As Integer
Astr="(÷÷)"
//Put a break here and step through the Debugger and watch the value
of pp
//Check for ')' in Astr
pp=-1
Do
pp=pp+2
pp=InStr(pp,Astr,")")
Loop Until pp=0
End Sub
This is the only code, except for Quit, in the program. It goes into
an endless loop for me every-time I run it. You don't need the '(' and
it appears the ')' can be any character, I have tried a 5 and a space,
just change the line pp=InStr(pp,Astr,"x") so that 'x' is the last
character in Astr. It seems the only thing that is important is having
'÷÷' in there someplace and they do not need to be together.
Aubrey
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|