Doug, Collections all have a “.length”, read only function.
For($i;$Col.length-1;0;-1) $Col[$i]… End for HTH! David Ringsmuth From: Douglas von Roeder via 4D_Tech Sent: Thursday, November 14, 2019 4:01 PM To: 4D iNug Technical Cc: Douglas von Roeder Subject: Collections Issue *C_COLLECTION*($coll_C) $coll_C:=*New collection*("Curly";"Moe";"Larry") *C_TEXT*($name_T) *For each* ($name_T;$coll_C;0;2) *ALERT*($name_T) *End for each* results in alerts for “Curly”, “Moe”, and “Larry". *For each* ($name_T;$coll_C;0;2) *ALERT*($name_T) *End for each* results in alerts for “Curly” and “Moe”. That’s expected because the docs state “end is excluded”. *For each* ($name_T;$coll_C;2;0) *ALERT*($name_T) *End for each* results in no alerts. That’s not expected. How does one iterate backwards through a collection? I realize that I can reverse the collection and iterate forward through it but there’s no contraindication to iterating backward. -- Douglas von Roeder 949-910-4084 ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************