simple looping question

Posted by Admin on 11-Dec-2006 07:38

i defined a variable and wasn't sure how to loop through it to display the entries.

But anyways the varB is initial to a,b,c,d,e....

and i was wondering how i could loop through this variable to display each letter.

i figured this is something simple but im starting to have trouble with it and im still learning progress.

All Replies

Posted by jmls on 11-Dec-2006 08:10

def var varA as int no-undo.

def var varB as char no-undo init "a,b,c,d,e".

do varA = 1 to num-entries(varB):

message entry(varA,VarB,",") view-as alert-box.


/* note the delimiter by default is "," so you don't need to specify it,

I just do so as a matter of practice */

Posted by Admin on 11-Dec-2006 08:12

thanks i was on the right track of thinking how to do it just syntax problems.

Posted by Admin on 11-Dec-2006 08:52

sorry to keep bothering ppl but then after taht how would i replace every other letter it displays with and "*"

Posted by Thomas Mercer-Hursh on 11-Dec-2006 10:54

Entry() can be used on the left side of the assignment as well as the right.

Posted by Admin on 11-Dec-2006 11:21

man haha ironically i just realized how to do it and checked here and thats what i ended up doing. thanks anyways

This thread is closed