Talk:Solve the no connection puzzle

From Rosetta Code

REXX formatting seems off

Near the top where it starts "aid=...", the lines after that seem mid aligned? (But I am viewing on my tab, but then again, it is usually OK)? --Paddy3118 (talk) 03:48, 5 October 2014 (UTC)

The REXX program no longer has that statement, perhaps you were viewing it whilst it was being updated?   Does the current version still have "off" formatting?   It looks OK to me, but then, it always did view OK to me at this end. -- Gerard Schildberger (talk) 06:48, 5 October 2014 (UTC)

Hi Gerard, I was talking specifically about the second section of code starting with the do-while loop that is all indented around sixteen spaces? <lang rexx>/**REXX program solves the "no-connection" puzzle (with eight pegs).*/ @. = @.1 = 'A C D E'  ; @.5 = 'E A B D F' @.2 = 'B D E F'  ; @.6 = 'F B E G' @.3 = 'C A D G'  ; @.7 = 'G C D E' @.4 = 'D A C E G'  ; @.8 = 'H D E F'

                  do nodes=1  while @.nodes\==;   _=word(@.nodes,1)
                  subs=0              /* [↓]  create list of node paths*/
                             do #=1  for words(@.nodes)-1
                             __=word(@.nodes,#+1);  if __>_  then iterate
                             subs=subs+1;           !._.subs=__
                             end  /*#*/
                  !._.0=subs          /*assign the number of node paths*/
                  end   /*nodes*/

</lang> --Paddy3118 (talk) 08:06, 5 October 2014 (UTC)

(No L in Gerard).     Yes, the   DO NODES=1 ...   starts in column 20, the   DO #=1 ...   starts in column 31, the indentation structure depending on what (I think) looks better (and not using any hard and fast rules) and conveys the logic structure and/or purpose of the DO loops.   I sometimes use a great-indent (as used here) for some smaller DO loops, but normally I only indent (each) DO loop and SELECT structures two spaces. -- Gerard Schildberger (talk) 08:46, 5 October 2014 (UTC)
Hi Gerard, what is the indentation aligned to that makes it look better? Is see nothing immediately above the "do nodes =1" and nothing immediately below the "end /*nodes*/" that continues the visual alignment as well as no indication that that block is a sub block of the preceding code line? --Paddy3118 (talk) 10:47, 5 October 2014 (UTC)