Posted By

Scooter on 02/28/09


Tagged


Versions (?)

Phonetic Alphabet


 / Published in: ASP
 

URL: http://reusablecode.blogspot.com/2009/02/phonetic-alphabet.html

Converts individual characters to their corresponding pronunciation in the internationally-standardized phonetic alphabet.

  1. <%
  2. ' Copyright (c) 2009, reusablecode.blogspot.com; some rights reserved.
  3. '
  4. ' This work is licensed under the Creative Commons Attribution License. To view
  5. ' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or
  6. ' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
  7. ' 94305, USA.
  8.  
  9. ' Convert letters and numbers to corresponding NATO phonetic alphabet code words.
  10. function phonetic(char)
  11. select case lcase(cstr(char))
  12. case "a"
  13. phonetic = "alfa"
  14. case "b"
  15. phonetic = "bravo"
  16. case "c"
  17. phonetic = "charlie"
  18. case "d"
  19. phonetic = "delta"
  20. case "e"
  21. phonetic = "echo"
  22. case "f"
  23. phonetic = "foxtrot"
  24. case "g"
  25. phonetic = "golf"
  26. case "h"
  27. phonetic = "hotel"
  28. case "i"
  29. phonetic = "india"
  30. case "j"
  31. phonetic = "juliett"
  32. case "k"
  33. phonetic = "kilo"
  34. case "l"
  35. phonetic = "lima"
  36. case "m"
  37. phonetic = "mike"
  38. case "n"
  39. phonetic = "november"
  40. case "o"
  41. phonetic = "oscar"
  42. case "p"
  43. phonetic = "papa"
  44. case "q"
  45. phonetic = "quebec"
  46. case "r"
  47. phonetic = "romeo"
  48. case "s"
  49. phonetic = "sierra"
  50. case "t"
  51. phonetic = "tango"
  52. case "u"
  53. phonetic = "uniform"
  54. case "v"
  55. phonetic = "victor"
  56. case "w"
  57. phonetic = "whiskey"
  58. case "x"
  59. phonetic = "x-ray"
  60. case "y"
  61. phonetic = "yankee"
  62. case "z"
  63. phonetic = "zulu"
  64. case "0"
  65. phonetic = "zero"
  66. case "1"
  67. phonetic = "one"
  68. case "2"
  69. phonetic = "two"
  70. case "3"
  71. phonetic = "three"
  72. case "4"
  73. phonetic = "four"
  74. case "5"
  75. phonetic = "five"
  76. case "6"
  77. phonetic = "six"
  78. case "7"
  79. phonetic = "seven"
  80. case "8"
  81. phonetic = "eight"
  82. case "9"
  83. phonetic = "niner"
  84. end select
  85. end function
  86. %>

Report this snippet  

You need to login to post a comment.