Re: For loop with separator

2019-07-06 Thread a11e99z via Digitalmars-d-learn
On Saturday, 6 July 2019 at 11:48:42 UTC, berni wrote: On Thursday, 4 July 2019 at 17:00:33 UTC, Q. Schroll wrote: The prime example is printing the comma when printing a list: There is one between any two elements, but neither is one at front or behind the last one. If it is just for

Re: For loop with separator

2019-07-06 Thread berni via Digitalmars-d-learn
On Thursday, 4 July 2019 at 17:00:33 UTC, Q. Schroll wrote: The prime example is printing the comma when printing a list: There is one between any two elements, but neither is one at front or behind the last one. If it is just for printing commas in between, you can use range.join(", ")

Re: For loop with separator

2019-07-04 Thread Alex via Digitalmars-d-learn
On Thursday, 4 July 2019 at 17:00:33 UTC, Q. Schroll wrote: Probably you've come over this problem once in a while, too. You have a repeating solution, so you use a for(each) loop. Sometimes, there is an action to be performed between the end of one iteration and the beginning of the next, if