cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-723593%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3EFor%20%E5%BE%AA%E7%8E%AF%EF%BC%9A%E8%AE%BE%E7%BD%AE%E7%AC%AC%E4%B8%80%E4%B8%AA%2F%E6%9C%80%E5%90%8E%E4%B8%80%E4%B8%AA%E6%89%A7%E8%A1%8C%E7%9A%84%E6%9D%A1%E7%9B%AE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-723593%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E2%98%90%20%E5%BE%88%E9%85%B7%E7%9A%84%E6%96%B0%E5%8A%9F%E8%83%BD%3CBR%20%2F%3E%E2%98%91%20%E5%8F%AF%E4%BB%A5%E5%B8%AE%E5%8A%A9%E5%BE%88%E5%A4%9A%E7%94%A8%E6%88%B7%EF%BC%81%3C%2FP%3E%3CP%3E%E2%98%90%20%E5%88%A0%E9%99%A4%E2%80%9C%E9%94%99%E8%AF%AF%E2%80%9D%3C%2FP%3E%3CP%3E%E2%98%90%20%E5%BE%88%E9%AB%98%E5%85%B4%E6%9C%89%3C%2FP%3E%3CP%3E%E2%98%90%20%E6%B2%A1%E4%BA%BA%E9%9C%80%E8%A6%81%E5%AE%83%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E6%98%AF%E4%BB%80%E4%B9%88%E5%90%AF%E5%8F%91%E4%BA%86%E8%BF%99%E4%B8%AA%E6%84%BF%E6%9C%9B%E6%B8%85%E5%8D%95%E8%AF%B7%E6%B1%82%EF%BC%9F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%E5%9C%A8%E8%84%9A%E6%9C%AC%E8%B0%83%E8%AF%95%E6%9C%9F%E9%97%B4%EF%BC%8C%E6%88%91%E7%BB%8F%E5%B8%B8%E6%83%B3%E6%9F%A5%E7%9C%8B%20for%20%E5%BE%AA%E7%8E%AF%E5%B9%B6%E9%92%88%E5%AF%B9%E5%85%B6%E4%B8%AD%E4%B8%80%E9%A1%B9%E9%80%90%E6%AD%A5%E6%89%A7%E8%A1%8C%E4%BB%A3%E7%A0%81%E3%80%82%3C%2FP%3E%3CP%3E%E6%9C%80%E6%9C%89%E8%B6%A3%E7%9A%84%E6%98%AF%EF%BC%9A%E7%94%A8%E6%9C%80%E5%90%8E%E4%B8%80%E4%B8%AA%E5%80%BC%E5%90%AF%E5%8A%A8%E5%BE%AA%E7%8E%AF%EF%BC%88%E4%BE%8B%E5%A6%82%E5%9C%A8%E5%A4%B1%E8%B4%A5%E4%B9%8B%E5%90%8E%EF%BC%89%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E4%B8%8A%E6%AC%A1%E8%BF%90%E8%A1%8C%E6%97%B6%E5%B7%B2%E8%AE%BE%E7%BD%AE%E6%89%80%E6%9C%89%E5%8F%82%E6%95%B0%EF%BC%8C%E5%8F%AA%E6%98%AF%E7%BC%BA%E5%B0%91%E5%BE%AA%E7%8E%AF%E5%8F%82%E6%95%B0%E3%80%82%E8%BF%99%E5%B0%B1%E6%98%AF%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84%E5%A4%A7%E5%A4%9A%E6%95%B0%20for%20%E5%BE%AA%E7%8E%AF%E9%83%BD%E5%A6%82%E4%B8%8B%E6%89%80%E7%A4%BA%EF%BC%9A%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EFor%20Each(%20%7Bmydt%7D%2C%20openTables%2C%0A%20%20%2F%2F%20mydt%20%3D%20openTables%5B13%5D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E5%8F%AF%E4%BB%A5%E6%89%A7%E8%A1%8C%E8%A2%AB%E7%A6%81%E7%94%A8%E7%9A%84%E4%BB%A3%E7%A0%81%E6%9D%A5%E8%AE%BE%E7%BD%AE%E8%B0%83%E8%AF%95%E7%9A%84%E5%BE%AA%E7%8E%AF%E5%8F%82%E6%95%B0%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E6%82%A8%E5%B8%8C%E6%9C%9B%E7%9C%8B%E5%88%B0%E4%BB%80%E4%B9%88%E6%94%B9%E8%BF%9B%EF%BC%9F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%E8%AF%B7%E5%9C%A8%E5%8F%B3%E9%94%AE%E5%8D%95%E5%87%BB%E4%B8%8A%E4%B8%8B%E6%96%87%E8%8F%9C%E5%8D%95%E4%B8%AD%E6%B7%BB%E5%8A%A0%E5%91%BD%E4%BB%A4%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1707555632830.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1707555632830.png%22%20style%3D%22width%3A%20369px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F61030i655A03ECDBB6B428%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1707555632830.png%22%20alt%3D%22hogi_0-1707555632830.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%5B%E7%BC%96%E8%BE%91%5D%20%E8%AE%A1%E5%88%92%20B%EF%BC%9A%E5%8F%AA%E9%9C%80%E5%A4%8D%E5%88%B6%20for()%20%E5%BE%AA%E7%8E%AF%E7%9A%84%E8%A1%8C%E4%B8%BA%EF%BC%9A%3CBR%20%2F%3E%E4%BD%BF%E5%BE%AA%E7%8E%AF%E5%8F%82%E6%95%B0%E5%8F%AF%E4%BB%A5%E4%BB%8E%E5%BE%AA%E7%8E%AF%E5%A4%96%E9%83%A8%E8%AE%BF%E9%97%AE%E3%80%82%3CBR%20%2F%3E%20-%26gt%3B%20%E5%A6%82%E6%9E%9C%E4%BB%A3%E7%A0%81%E5%81%9C%E6%AD%A2%EF%BC%8C%E5%BE%AA%E7%8E%AF%E5%8F%82%E6%95%B0%E6%98%AF%E5%BE%AA%E7%8E%AF%E4%B8%AD%E7%9A%84%E6%9C%80%E5%90%8E%E4%B8%80%E4%B8%AA%E3%80%82%3CBR%20%2F%3E%20-%26gt%3B%20%E9%9D%9E%E5%B8%B8%E9%80%82%E5%90%88%E8%B0%83%E8%AF%95%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%99%E4%B8%AA%E6%83%B3%E6%B3%95%E5%BE%88%E9%87%8D%E8%A6%81%EF%BC%9F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%E8%BF%99%E5%B9%B6%E4%B8%8D%E9%87%8D%E8%A6%81%EF%BC%8C%E4%BD%86%E6%AF%8F%E4%B8%AA*)%20JSL%20%E7%A8%8B%E5%BA%8F%E5%91%98%E9%83%BD%E4%BC%9A%E5%96%9C%E6%AC%A2%E4%BD%A0%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fforums%2Fsearchpage%2Ftab%2Fmessage%3Ffilter%3Dlocation%2CauthorId%26amp%3Bq%3Dfeature%26amp%3Blocation%3Didea-board%3Ajmp-wish-list%26amp%3Bauthor_id%3D26800%22%20target%3D%22_self%22%3E%E6%9B%B4%E5%A4%9A%E6%84%BF%E6%9C%9B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_2-1702196401638.png%22%20style%3D%22width%3A%2036px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_2-1702196401638.png%22%20style%3D%22width%3A%2036px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F59505i92BA52D1289B6F5C%2Fimage-dimensions%2F36x39%3Fv%3Dv2%22%20width%3D%2236%22%20height%3D%2239%22%20role%3D%22button%22%20title%3D%22hogi_2-1702196401638.png%22%20alt%3D%22hogi_2-1702196401638.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E*%EF%BC%89%E4%B9%9F%E8%AE%B8%E6%9C%89%E7%90%86%E7%94%B1%E6%94%B9%E5%8F%98%E8%BF%99%E7%A7%8D%E8%A1%8C%E4%B8%BA%E3%80%82%3CBR%20%2F%3E%E6%89%80%E4%BB%A5%EF%BC%9A%E4%B9%9F%E8%AE%B8%E4%B8%8D%E6%98%AF%3CU%3E%E6%AF%8F%E4%B8%AA%3C%2FU%3EJSL%20%E7%BC%96%E7%A0%81%E5%91%98%E9%83%BD%E4%B9%90%E4%BA%8E%E7%9C%8B%E5%88%B0%E6%97%A7%E7%9A%84%EF%BC%88%E5%BC%83%E7%94%A8%E7%9A%84%EF%BC%9F%EF%BC%89%E8%A1%8C%E4%B8%BA%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-723593%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8A%A8%E5%8C%96%E5%92%8C%E8%84%9A%E6%9C%AC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-778848%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AFor%20%E5%BE%AA%E7%8E%AF%EF%BC%9A%E8%AE%BE%E7%BD%AE%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%9D%A1%E7%9B%AE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-778848%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E5%8D%8A%E5%B9%B4%E4%BA%86%EF%BC%8C%E5%8F%AA%E5%BE%97%E5%88%B0%E4%BA%86%202%20%E4%B8%AA%20Kudos%E3%80%82%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F42584%22%20target%3D%22_blank%22%3E%40Sarah-Sylvestre%3C%2FA%3E%20%3CSPAN%3E%EF%BC%8C%E4%BD%A0%E8%83%BD%E5%90%A6%E5%B0%86%E8%BF%99%E4%B8%AA%E6%84%BF%E6%9C%9B%E5%AD%98%E6%A1%A3%EF%BC%9A%EF%BC%89%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-798055%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AFor%20%E5%BE%AA%E7%8E%AF%EF%BC%9A%E8%AE%BE%E7%BD%AE%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%9D%A1%E7%9B%AE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-798055%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F42584%22%20target%3D%22_blank%22%3E%40%E8%8E%8E%E6%8B%89%C2%B7%E8%A5%BF%E5%B0%94%E7%BB%B4%E6%96%AF%E7%89%B9%3C%2FA%3E%3CSPAN%3E%20%3C%2FSPAN%3E%3CBR%20%2F%3E%E4%BD%8E%E4%BC%98%E5%85%88%E7%BA%A7%20-%26gt%3B%20%E4%B8%80%E6%97%A6%E9%87%8D%E8%A6%81%E7%9A%84%E4%BB%BB%E5%8A%A1%E5%AE%8C%E6%88%90%E5%B0%B1%E5%8F%AF%E4%BB%A5%E5%85%B3%E9%97%AD%E5%B9%B6%E9%87%8D%E6%96%B0%E6%BF%80%E6%B4%BB%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-801198%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AFor%20%E5%BE%AA%E7%8E%AF%EF%BC%9A%E8%AE%BE%E7%BD%AE%E7%AC%AC%E4%B8%80%E4%B8%AA%E6%9D%A1%E7%9B%AE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801198%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26800%22%20target%3D%22_blank%22%3E%40hogi%3C%2FA%3E%E5%86%99%E9%81%93%EF%BC%9A%3CBR%20%2F%3E%3CP%3E%3CEM%3E%E5%8F%AA%E6%98%AF%E7%BC%BA%E5%B0%91%E5%BE%AA%E7%8E%AF%E5%8F%82%E6%95%B0%E3%80%82%3C%2FEM%3E%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E5%95%8A%EF%BC%8C%E7%8E%B0%E5%9C%A8%E6%88%91%E6%98%8E%E7%99%BD%E4%BA%86%EF%BC%81%3CBR%20%2F%3E%E8%BF%99%E6%98%AF%20For%20each%20%E5%BE%AA%E7%8E%AF%E7%9A%84%E4%B8%80%E4%B8%AA%E7%BC%BA%E7%82%B9%EF%BC%81%3CBR%20%2F%3E%3CBR%20%2F%3E%20Python%EF%BC%9A%3C%2FP%3E%3CPRE%3Efruits%20%3D%20%5B%22apple%22%2C%20%22banana%22%2C%20%22cherry%22%5D%0Afor%20x%20in%20fruits%3A%0A%20%20print(x)%0Aprint(%22__%22)%20%20%0Aprint(x)%3C%2FPRE%3E%3CP%3E-%26gt%3B%20%E4%BD%9C%E5%93%81%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJSL%20%23%201%3A%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Efor()%3C%2FFONT%3E%E5%BE%AA%E7%8E%AF%EF%BC%9A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20default%20to%20here(1)%3B%0A%0Afor(i%3D1%2Ci%26lt%3B3%2Ci%2B%2B%2C%201)%3B%0APrint(i)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E-%26gt%3B%20%E4%BD%9C%E5%93%81%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EJSL%20%232%EF%BC%9A%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Efor%20each()%3C%2FFONT%3E%E5%BE%AA%E7%8E%AF%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20default%20to%20here(1)%3B%0A%0Afor%20each(%7Bj%7D%2C%201%3A%3A10%2CPrint(j))%3B%0APrint(j)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E-%26gt%3B%20%E5%A4%B1%E8%B4%A5%EF%BC%9Aj%20%E6%9C%AA%E5%9C%A8%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Efor%20each()%3C%2FFONT%3E%E5%BE%AA%E7%8E%AF%E4%B9%8B%E5%A4%96%E5%AE%9A%E4%B9%89%3CBR%20%2F%3E-%26gt%3B%20%E4%BD%BF%E5%BE%97%E4%BB%A3%E7%A0%81%E8%B0%83%E8%AF%95%E5%8F%98%E5%BE%97%E5%9B%B0%E9%9A%BE%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

For loop: set first / last executed entry

☐ cool new feature
☑ could help many users!

☐ removes a „bug“

☐ nice to have

☐ nobody needs it

 

What inspired this wish list request? 

During script debugging, I often want to look into a for loop and execute the code step by step for one of the items.

Most interesting: start the loop with the last value [e.g. after a failure]

 

 

All parameters are already set by the last run, just the looping parameter is missing. This is why most of my for loops look like this:

 

For Each( {mydt}, openTables,
  // mydt = openTables[13]

the disabled code can be executed to set the looping parameter for debugging.

 

 

What is the improvement you would like to see? 

Please add a command to the right click context menu:

hogi_0-1707555632830.png

 

[edit] plan B: Just copy the behavior of the for() loop:
make the looping parameter accessible from outside the loop.
-> if the code stops, the looping parameter is the last one in the cycle.
-> great for debugging

 

Why is this idea important? 

It's not important, but every *) JSL coder will love you.

 

more wishes by  hogi_2-1702196401638.png

 

*) maybe there was a reason to change the behavior.
So: maybe not every  JSL coder is happy to see the old (deprecated?) behavior.

3 Comments
hogi
Level XII

half a year and just 2 Kudos.
@Sarah-Sylvestre , could you please archive this wish : )

hogi
Level XII

@Sarah-Sylvestre 
low prio -> can be closed and reactivated once the important ones are finished.

hogi
Level XII

@hogi wrote:

just the looping parameter is missing.


Ah, now I got it!
It's a disadvantage of the For each loop!

Python:

fruits = ["apple", "banana", "cherry"]
for x in fruits:
  print(x)
print("__")  
print(x)

-> works

 

JSL # 1: for() loop:

Names default to here(1);

for(i=1,i<3,i++, 1);
Print(i);

-> works

 

JSL #2: for each() loop

Names default to here(1);

for each({j}, 1::10,Print(j));
Print(j);

-> fails : j is not defined outside of the for each() loop 
-> makes it difficult to debug the code