Visualize a tree: Difference between revisions

→‎{{header|REXX}}: replaced repl by (Standard) changestr
(→‎{{header|REXX}}: added the rep procedure)
(→‎{{header|REXX}}: replaced repl by (Standard) changestr)
Line 1,202:
If st<>'' Then
st=left(st,length(st)-2)' '
st=replchangestr(st,' ` ',st,'` ')
Say st||s||node.c.0name
Call tt c,st||s
Line 1,252:
node.a.0level=node.father.0level+1
Return
repl: Procedure
/* REXX ***************************************************************
* Replace old by new in s
**********************************************************************/
Parse Arg s,new,old
in=s
Do Until p=0
p=pos(old,s)
If p>0 Then
s=left(s,p-1)||new||substr(s,p+length(old))
End
Return s
</lang>
{{out}}
2,299

edits