xboxscene.org forums

Author Topic: Simple Pig Latin Translator  (Read 102 times)

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Simple Pig Latin Translator
« on: March 22, 2004, 02:51:00 PM »

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
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Simple Pig Latin Translator
« Reply #1 on: March 22, 2004, 03:38:00 PM »

Interesting, my Xbox-Scene user name in Pig Latin is lattspottfay, sounds little odd
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Simple Pig Latin Translator
« Reply #2 on: March 22, 2004, 09:39:00 PM »

laugh.gif  smile.gif
Logged