Advertisement
Guest User

Untitled

a guest
Dec 6th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. defint a-z
  2. declare sub SetLeetLetters()
  3. cls
  4.  
  5. enum enumLetters
  6.     A = 1
  7.     B
  8.     C
  9.     D
  10.     E
  11.     F
  12.     G
  13.     H
  14.     I
  15.     J
  16.     K
  17.     L
  18.     M
  19.     N
  20.     O
  21.     P
  22.     Q
  23.     R
  24.     S
  25.     T
  26.     U
  27.     V
  28.     W
  29.     X
  30.     Y
  31.     Z
  32. end enum
  33.  
  34. dim shared LeetLetters(1 to 26) as string
  35. SetLeetLetters 'Set the letters (call the sub)
  36.  
  37. do 'Start the program loop
  38. print "What should I convert to leetspeak (nothing ends program)?"
  39. input ">", NormalText$
  40.  
  41. if NormalText$ = "" then end
  42.  
  43. for Counter = 1 to len$(lcase$(NormalText$))             'Start the conversion loop
  44.     Letter$ = mid$(NormalText$, Counter, 1)              'Get the letter
  45.     ASCIINum = ASC(Letter$) - 96                         'Get the letter # (1-26)
  46.     If ASCIINum > 0 and ASCIINum < 27 then               'Make sure its a letter
  47.         LeetText$ = LeetText$ + LeetLetters(ASCIINum)    'Put it into the output
  48.     else
  49.         LeetText$ = LeetText$ + Letter$                  'So it gets nonletters eg 1-9, (),
  50.     end if                                               'spaces, [], _, -, =, ect                                
  51. next                                                          
  52.  
  53. print
  54. print "Normal: ";  NormalText$
  55. print "Leet:   "; LeetText$
  56. print
  57. print "Press any key to continue..."
  58. while inkey$ = "": wend                                  'Pause the program
  59. cls
  60. loop
  61.  
  62. sub SetLeetLetters
  63.     LeetLetters(A) = "4"
  64.     LeetLetters(B) = "|3"
  65.     LeetLetters(C) = "("
  66.     LeetLetters(D) = "|)"
  67.     LeetLetters(E) = "3"
  68.     LeetLetters(F) = "ph"
  69.     LeetLetters(G) = "6"
  70.     LeetLetters(H) = "#"
  71.     LeetLetters(I) = "!"
  72.     LeetLetters(J) = ";"
  73.     LeetLetters(K) = "|{"
  74.     LeetLetters(L) = "l"
  75.     LeetLetters(M) = "/\/\"
  76.    LeetLetters(N) = "/\/"
  77.    LeetLetters(O) = "()"
  78.    LeetLetters(P) = "<PIPE>*"
  79.    LeetLetters(Q) = "(,)"
  80.    LeetLetters(R) = "<PIPE>2"
  81.    LeetLetters(S) = "5"
  82.    LeetLetters(T) = "7"
  83.    LeetLetters(U) = "(_)"
  84.    LeetLetters(V) = "\/"
  85.    LeetLetters(W) = "\/\/"
  86.    LeetLetters(X) = "><"
  87.    LeetLetters(Y) = "`/"
  88.    LeetLetters(Z) = "2"
  89. end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement