| CODE |
;################################################ ;# Name: Pig Latin Translator ;# By: flattspott ;# Date: 03-22-2004 ;# Version 0.1 ;# Purpose: None really, just something to mess with ;# Usage: Enter a single word to translate. ;# Cat becomes atcay and atcay becomes Cat ;################################################ Set PL "ay" StringInput String Single "Enter a single word to translate" SetFunc Count Length %String% Sub Count 2 SetFunc Status Mid %Count% 2 %String% If %Status% == "%PL%" Then ; ----- Translate from Pig Latin ----- SetFunc Switch Replace %Status% "" %String% Sub Count 1 SetFunc Move Mid %Count% 1 %Switch% SetFunc Switched Replace %Move% "" %Switch% SetFunc Moved Upper %Move% Set NewStr "%Moved%%Switched%" Else ; ----- Translate to Pig Latin ----- SetFunc Move Left 1 %String% SetFunc Moved Lower %Move% SetFunc Switch Replace %Move% "" %String% Set NewStr "%Switch%%Moved%%PL%" EndIf MsgBox "%NewStr%" Quit |