Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defint a-z
- declare sub SetLeetLetters()
- cls
- enum enumLetters
- A = 1
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- T
- U
- V
- W
- X
- Y
- Z
- end enum
- dim shared LeetLetters(1 to 26) as string
- SetLeetLetters 'Set the letters (call the sub)
- do 'Start the program loop
- print "What should I convert to leetspeak (nothing ends program)?"
- input ">", NormalText$
- if NormalText$ = "" then end
- for Counter = 1 to len$(lcase$(NormalText$)) 'Start the conversion loop
- Letter$ = mid$(NormalText$, Counter, 1) 'Get the letter
- ASCIINum = ASC(Letter$) - 96 'Get the letter # (1-26)
- If ASCIINum > 0 and ASCIINum < 27 then 'Make sure its a letter
- LeetText$ = LeetText$ + LeetLetters(ASCIINum) 'Put it into the output
- else
- LeetText$ = LeetText$ + Letter$ 'So it gets nonletters eg 1-9, (),
- end if 'spaces, [], _, -, =, ect
- next
- print
- print "Normal: "; NormalText$
- print "Leet: "; LeetText$
- print
- print "Press any key to continue..."
- while inkey$ = "": wend 'Pause the program
- cls
- loop
- sub SetLeetLetters
- LeetLetters(A) = "4"
- LeetLetters(B) = "|3"
- LeetLetters(C) = "("
- LeetLetters(D) = "|)"
- LeetLetters(E) = "3"
- LeetLetters(F) = "ph"
- LeetLetters(G) = "6"
- LeetLetters(H) = "#"
- LeetLetters(I) = "!"
- LeetLetters(J) = ";"
- LeetLetters(K) = "|{"
- LeetLetters(L) = "l"
- LeetLetters(M) = "/\/\"
- LeetLetters(N) = "/\/"
- LeetLetters(O) = "()"
- LeetLetters(P) = "<PIPE>*"
- LeetLetters(Q) = "(,)"
- LeetLetters(R) = "<PIPE>2"
- LeetLetters(S) = "5"
- LeetLetters(T) = "7"
- LeetLetters(U) = "(_)"
- LeetLetters(V) = "\/"
- LeetLetters(W) = "\/\/"
- LeetLetters(X) = "><"
- LeetLetters(Y) = "`/"
- LeetLetters(Z) = "2"
- end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement