Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rep vs forstr s ss="one[]two[][]four[]"
#1
in the help file for getl you use the following code to get each line of a var.
Code:
Copy      Help
str s ss="one[]two[][]four[]"
int i
for i 0 2000000000
    if(s.getl(ss -i)<0) break ;;no more
    if(s.len=0) continue ;;skip empty
    out s

i noticed the rep also works.
Code:
Copy      Help
str s ss="one[]two[][]four[]"
rep
    if(s.getl(ss)<0) break ;;no more
    if(s.len=0) continue ;;skip empty
    out s

would it be better to use rep since you dont need the extra var and you dont have to calc or does "for" run better in an intrinsic way?

thanks


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)