#!/usr/bin/rebol REBOL [ Title: "A First Rot13 in REBOL" Author: "Teknovore " Date: 4-Oct-1998 ] lowtable: "anbocpdqerfsgthuivjwkxlymznaobpcqdresftguhviwjxkylzm" uptable: "ANBOCPDQERFSGTHUIVJWKXLYMZNAOBPCQDRESFTGUHVIWJXKYLZM" while [ string: input not empty? string ] [ while [not empty? string] [ char: make char! string string: next string if not none? find/case lowtable char [ foo: length? lowtable foo: foo - length? do [find/case lowtable char] if foo // 2 <> 0 [ foo: length? lowtable foo: foo - length? do [find/case next do [find/case lowtable char] char] ] char: pick lowtable foo + 2 ] else [ if not none? find/case uptable char [ foo: length? uptable foo: foo - length? do [find/case uptable char] if foo // 2 <> 0 [ foo: length? uptable foo: foo - length? do [find/case next do [find/case uptable char] char] ] char: pick uptable foo + 2 ] ] prin char ] ] quit