reportcities: PROCEDURE EXPOSE (dict$.exposestems)
mpout.0=0
writel('Cities with Population > 1,000,0000')
writel(LEFT('Cities',20)right('Population',15) 'Country')
writel(COPIES('-',65))
DO i=1 TO cities.0
city=WORD(cities.i,1)
tcity=TRANSLATE(city)
tcity=TRANSLATE(tcity,'___','-')
writel(LEFT(city,20)right(cities.tcity.population,15) LEFT(cities.tcity.country,30))
END
writel(cities.0 'Cities reported')
RETURN
writel:
PARSE ARG line
lmax=mpout.0+1
mpout.0=lmax
mpout.lmax=line
RETURN |