How to loop

1. Member
Join Date
Dec 1969
Posts
40

## How to loop

&#060;%<BR>i = 1<BR>merki = averylongstring<BR>%&#062;<BR>&#060;%<BR>shst = mid(merki,i,4)<BR>%&#062;<BR>shst is &#060;%= shst %&#062;<BR><BR>If there is anything left in the string "merki" then I need to increase "i" by 4 and then run the: <BR><BR>&#060;%<BR>shst = mid(merki,i,4)<BR>%&#062;<BR>shst is &#060;%= shst %&#062;<BR><BR>again but I dont know how to do this.<BR><BR>Hope you can help<BR>Birkir

2. Senior Member
Join Date
Dec 1969
Posts
1,849

## A.S.P.F.A.Q. (Chanting) A.S.P.F.A.Q

Look up while and do while loops.<BR><BR>-- Whol

3. Senior Member
Join Date
Dec 1969
Posts
1,285

## RE: How to loop

use the following procedure to be able to call that code whenever you want:<BR><BR>sub GetSHST(byval shst, byval merki, byval i)<BR> shst = mid(merki,i,4)<BR> response.write "shst is " & shsht<BR>end sub<BR><BR>but what do you mean by: &#039;If there is anything left in the string "merki"&#039;?

4. Senior Member
Join Date
Dec 1969
Posts
1,285

## RE: A.S.P.F.A.Q. (Chanting) A.S.P.F.A.Q

you been in here all day haven&#039;t you?

5. Senior Member
Join Date
Dec 1969
Posts
1,849