%externalroutine nrs(%string (255) s) %externalroutinespec define(%string (255) s) %string (255) t,u,v %integer i,j,k %owninteger state = 0, lines = 0 %ownintegerarray field(0:4) = 34, 18, 20, 5, 5 %ownintegerarray spc(0:2) = 34, 52, 72 %ownbyteintegerarray first(0:4) = 'L', 'S', 'D', 'Y', 'A' %ownstring (25) %array names(0:4) = %c "Long name", "Short name", "DTE string", "YBTS string", "Application relay" %on 9 %start %stop %finish %routine strip(%string (*) %name s) %integer i,j,k k=length(s) %if k<20 %then s="" %andreturn charno(s, 18) = k-18 s = string(addr(s)+18) %end %routine next item printstring(s) newline state = 0 lines = lines+1 %end %routine readstring(%string (*) %name s) %integer i,j s="" %cycle readsymbol(i) %return %if i = nl s = s.tostring(i) %repeat %end %unless s-> s.("/").t %start printstring("Parameters / please ") %stop %finish define("1,".s) define("2,".t) select input(1) select output(2) %cycle readstring(s) %if charno(s,1) = '.' %start newline %if lines > 0 %then newpage lines = 0; state = 0 printstring(s) newline %continue %finish %if length(s) < 10 %then %continue %if charno(s, 1) = first(state) %start first again: strip(s) %if state = 3 %then next item %and %continue printstring(s); spaces(field(state)-length(s)) %if length(s) > field(state) %then newline %and spaces(spc(state)) state = state+1 %continue %finish %if charno(s, 1) = first(4) %start ! applics strip(s) %if state = 0 %then spaces(spc(2)) printstring("Relay:") next item %continue %finish %if charno(s, 1) = first(0) %start state = 0; newline -> first again %finish %continue; ! ?????????????????????????????????????????????????? %repeat %end %endofprogram