Jump to content


Photo

Simple Pig Latin Translator


  • Please log in to reply
2 replies to this topic

#1 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 22 March 2004 - 10:51 PM

Only translates a single word from english to pig latin or from pig latin to english

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

Edited by flattspott, 22 March 2004 - 11:30 PM.


#2 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 22 March 2004 - 11:38 PM

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

#3 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 23 March 2004 - 05:39 AM

lol laugh.gif smile.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users