|
Post by Jerry Muelver on Oct 11, 2007 5:54:01 GMT -5
I use this for creating coded messages to put on the blackboard for K6-12 students to worry about in their spare time.... ' ROT13 coder ' by Jerry Muelver rotltrs$ = "abcdefghijklmnopqrstuvwxyzabcdefghijklm" rotltrs$ = rotltrs$ + "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM" textin$ = "paste text here" textout$ = "encoded text here"
[display] cls print "ROT13 Translator" print "Type or paste source text here:" textarea #textin, textin$ print " " link #doit, "Convert Text", [doit] print " " print "See encoded text here:" textarea #textout, textout$ print " " link #goagain, "Go Again", [display] print " or "; link #quit, "Quit", [quit] wait
[doit] gosub [getFields] for i = 1 to len(textin$) a$ = mid$(textin$,i,1) rotpos = instr(rotltrs$,a$) if rotpos > 0 then a$ = mid$(rotltrs$,rotpos+13,1) end if textout$ = textout$ + a$ next i goto [display]
[getFields] textin$ = #textin contents$() textout$ = "" return [quit] cls end
You can check it out by copying your encoded message, pasting it into the "pate text here" box, and re-encoding it.
|
|
|
Post by Janet on Oct 11, 2007 8:42:32 GMT -5
I use this for creating coded messages to put on the blackboard for K6-12 students to worry about in their spare time.... ' ROT13 coder ' by Jerry Muelver rotltrs$ = "abcdefghijklmnopqrstuvwxyzabcdefghijklm" rotltrs$ = rotltrs$ + "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM" textin$ = "paste text here" textout$ = "encoded text here"
[display] cls print "ROT13 Translator" print "Type or paste source text here:" textarea #textin, textin$ print " " link #doit, "Convert Text", [doit] print " " print "See encoded text here:" textarea #textout, textout$ print " " link #goagain, "Go Again", [display] print " or "; link #quit, "Quit", [quit] wait
[doit] gosub [getFields] for i = 1 to len(textin$) a$ = mid$(textin$,i,1) rotpos = instr(rotltrs$,a$) if rotpos > 0 then a$ = mid$(rotltrs$,rotpos+13,1) end if textout$ = textout$ + a$ next i goto [display]
[getFields] textin$ = #textin contents$() textout$ = "" return [quit] cls end
You can check it out by copying your encoded message, pasting it into the "pate text here" box, and re-encoding it. Jerry's code using the pre tags doesn't copy and paste well for me. If you're having the same problem, try this ' ROT13 coder' by Jerry Muelver rotltrs$ ="abcdefghijklmnopqrstuvwxyzabcdefghijklm" rotltrs$ = rotltrs$ + "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM" textin$ = "paste text here" textout$ = "encoded text here" [display] cls print "ROT13 Translator" print "Type or paste source text here:" textarea #textin, textin$ print " " link #doit, "Convert Text", [doit] print " " print "See encoded text here:" textarea #textout, textout$ print " " link #goagain, "Go Again", [display] print " or "; link #quit, "Quit", [quit] wait [doit] gosub [getFields] for i = 1 to len(textin$) a$ = mid$(textin$,i,1) rotpos = instr(rotltrs$,a$) if rotpos > 0 then a$ = mid$(rotltrs$,rotpos+13,1) end if textout$ = textout$ + a$ next i goto [display] [getFields] textin$ = #textin contents$() textout$ = "" return [quit] cls end
|
|