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-09 05:48 AM
d = B - gs_fw_lower - gs_fw_upper - 2 * gs_int_fw !Louvre space IF louvre_over <= 0 then !If NO louvre overlap n = int(d /(gs_louvre_width - louvre_over)) dp = gs_louvre_width - louvre_over ELSE dp = gs_louvre_thk / ( cos ( atn ( ( gs_louvre_width - louvre_over) / gs_louvre_thk) ) ) n = int(d / dp) + 1 endIF
FOR i=1 to n ... IF Louvred_sealside = "Both" then IF i = 1 | i = n then gs_louvre_opening_angle = gs_louvre_opening_max gs_louvre_width = sqr((d - (dp * (n - 1) + Louvre_over))^2 - (gs_louvre_thk)^2 ) + Louvre_over endIF endIF ... cprism_ louvtopmat, louvbotmat, louvsidemat, 5, gs_louvre_thk, -a / 2 + gs_fw_side_right + gs_int_fw, -(gs_louvre_width) / 2, _status, -a / 2 + gs_fw_side_right + gs_int_fw, (gs_louvre_width) / 2, _status, a / 2 - gs_fw_side_left - gs_int_fw, (gs_louvre_width) / 2, _status, a / 2 - gs_fw_side_left - gs_int_fw, -(gs_louvre_width) / 2, _status, -a / 2 + gs_fw_side_right + gs_int_fw, -(gs_louvre_width) / 2, -1 ... 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 09:17 AM
FOR i = 1 to n step 1 If i = 3 then x = 5 then text2 y, 0, x x=1 endif text2 y, 0, x next imaybe if you know precisely when it occurs just exclude from the loop? (though it looks awful)
2020-09-09 09:43 AM
A. wrote:
maybe if you know precisely when it occurs just exclude from the loop? (though it looks awful)
FOR i=1 to 2 ...
if i=3 then ...
FOR i=4 to n ...
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 10:01 AM
Lingwisyer wrote:You just said it:
...parameterX=A, where Ais some previously defined value, is it possible to pick out when i=G then X=Bwithout needing to save Ato a new parameter so that for other steps the original value is still utilised?
if i = G then X = B else X = A
2020-09-09 10:18 AM
Peter wrote:
Lingwisyer wrote:You just said it:
...parameterX=A, where Ais some previously defined value, is it possible to pick out when i=G then X=Bwithout needing to save Ato a new parameter so that for other steps the original value is still utilised? if i = G then X = B else X = A
C = X A = X ... if i = G then C = B else C = A ... *replace X with C in all dependent macros*
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 01:54 PM
call "macro" parameters A = something, ....The subsequent calls from "macro" will use the value of
call "macro" parameters all, A = something