%externalroutine C to Imp(%bytename c, %string(*)%name s) s = "" %while c # 0 %cycle s = s . to string(c) c == c ++ 1 %repeat %end %externalroutine Imp to C(%string(255) s, %bytename c) %integer i %for i = 1, 1, length(s) %cycle c = charno(s, i) c == c ++ 1 %repeat c = 0 %end %externalroutine Imp to lower C(%string(255) s, %bytename c) %integer i %for i = 1, 1, length(s) %cycle c = charno(s, i) c = c - 'A' + 'a' %if 'A' <= c <= 'Z' c == c ++ 1 %repeat c = 0 %end %externalintegerfn C compare(%bytename a, b) %integer d %cycle d = a - b %result = d %if d # 0 %or a = 0 {hence b = 0} a == a ++ 1; b == b ++ 1 %repeat %end %externalintegerfn C compare ignoring case(%bytename a, b) %integer d %cycle a = a - 'a' + 'A' %if 'a' <= a <= 'z' b = b - 'a' + 'A' %if 'a' <= b <= 'z' d = a - b %result = d %if d # 0 %or a = 0 {hence b = 0} a == a ++ 1; b == b ++ 1 %repeat %end %end %of %file