10-18-2017 01:35 AM - edited 10-18-2017 01:52 AM
Hallo,
nach jedem Zyklus möchte ich die Systemvariablen auf 0 setzen.
R1=R2=R3=R4=R5=R6=R7=R8=R9=R10=R11=R12=R13=R14=R15=R16=R17=R18=R19=R20=R21=R22=R23=0
funktioniert aber nur für R1.
Habt ihe einen Tip, wie es funktioniert, ohne explitit jede Variable einzeln auf 0 zu setzen?
after each cycle I want to set the system variables to 0.
R1 = R2 = R3 = R4 = R5 = R6 = R7 = R8 = R9 = R10 = R11 = R12 = R13 = R14 = R15 = R16 = R17 = R18 = R19 = R20 = R21 = R22 = R23 = 0
but it works only for R1.
Do you have any idea how it works without explicitly set each variable individually to 0?
10-18-2017 02:35 AM
In VBS your code will become and logical expression comparing all of them setting true or false to R1.
You either have to write each of them or you can use a loop.
dim i : for i = 1 to 23 : execute("R" & i & "=0") : next
I am not sure if a loop is a good aproach because you will never be able to find that the R variables are assigned using this line.
If you just fear multiple lines the : is your friend.
R1 = 0:R2=R1:R3=R1
10-18-2017 03:23 AM
Thanks!