-- rot13 in sather -- teknovore / 2002 -- -- There are more object-oriented ways to do this, but at least it shows -- off Sather iterators. class MAIN is main is i:INT; s:FSTR; loop while!(~#IN.eof); s := #FSTR(#IN.get_str); loop i := s.ind!; s[i] := rot13(s[i]); end; #OUT + s + "\n"; end; end; rot13(c:CHAR):CHAR is if c.is_alpha then if c.lower < 'n' then return CHAR::from_ascii_int(c.ascii_int+13); else return CHAR::from_ascii_int(c.ascii_int-13); end; else return c; end; end; end;