Dear forum members
TIA
How can I design a loop counting backward?
I'll appreciate anyhelp
regards
carlost
Moderator: Neosoft Support
SetVar "[n]" "-10"
Loop "[n]" "0" "[i]"
SetVar "[n]" "[n]+1"
SetVar "[List]" "[List][n][#13]"
AlertBox "" "[List]"
EndLoop
SetVar "[n]" "10"
Loop "-[n]" "0" "[i]"
If "[i]" "<" "0"
StrDel "[i]" "1" "1" "[num]"
Else
SetVar "[num]" "[i]"
EndIf
SetVar "[List]" "[List][num][#13]"
AlertBox "" "[List]"
EndLoop
SetVar "[countFrom]" "10"
SetVar "[countTo]" "0"
Loop "[countFrom]" "[countTo]" "[currentValue]"
AlertBox "currentValue" "[currentValue]"
EndLoop
Tray #1
setvar "[flg]" "0"
while "[flg]" "=" "0"
.....
endwhile
Tray #2
setvar "[end]" "1234"
setvar "[n]" "1"
setvar "[flg]" "0"
while "[flg]" "=" "0"
math '[n]+1" "" "[n]"
.-.-.-.-.-.-.-.-
if "[n]" "=" "[end]"
exitwhile
endif
.....
endwhile
Try#3
loop "0" "1" "[c]"
....
setvar "[c]" "0"
endloop
Return to General NeoBook Discussions
Users browsing this forum: No registered users and 3 guests