2020-09-08 10:42 AM - last edited on 2022-09-26 10:43 PM by Daniel Kassai
!======THESE TWO LINES CANNOT BE INCLUDED IN THE LOOP====== x = 1 n = 5 !=========================================================== FOR i = 1 to n step 1 If i = 3 then x = 5 text2 y, 0, x next i
Returns: 1 1 5 5 5 Desired: 1 1 5 1 1
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-09-08 11:07 AM
for i = 1 to n X=A if i = G then X=B endif next i
2020-09-08 11:15 AM
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-09-08 11:41 AM
Lingwisyer wrote:
Doesn't that change the value of X for all proceeding steps?
X=10 X_orig = X X=20Then if ever I need to go back to the original value...
X= X_orig
2020-09-08 12:17 PM
x = 1 n = 5 FOR i = 1 to n step 1 If i = 3 then x = 5 endif text2 y, 0, x next i
2020-09-09 03:30 AM
Moonlight wrote:
Your error was in the conditional statement location
x = 1 n = 5 FOR i = 1 to n step 1 If i = 3 then x = 5 endif text2 y, 0, x next i
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-09-09 03:47 AM
n = 5 FOR i = 1 to n step 1 x = 1 If i = 3 then x = 5 endif text2 i, 0, x next i
2020-09-09 03:56 AM
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-09-09 04:02 AM
n = 5 for i = 1 to n x = 1 If i = 3 then x = 5 text2 i, 0, x next i
2020-09-09 04:08 AM