All Forums >> [Scripting] >> Post a VBScript >> Englisch dictonary Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Thanks for sharing your code. In the interest of promoting good coding habits, I would suggest putting this code at the top:
Option Explicit
Dim objAlfabet Dim strInvoer Dim strUitvoer Dim strKarakters Dim i Dim bla
The next thing that I would do is to change strKarakters to be nKarakters since it is intended to hold an integer and not a string. I would also change bla to be strBla since it is intended to hold a string. You could also consider changing objAlfabet to dicAlfabet. This is really a personal preference issue with no real standard to support it. I find that I use dictionaries often enough that it is worth distinguishing them from other objects.
I had a play with this because it looked like a good example of the vbscript dictionary.
I came up with a script which should satisfy English Speakers, The deaf, and ebgreen's syntax.
I am not sure what the word "test" is for in the script. Can anyone point me to documentation for dictionaries? Also I have heard it is good programming practice to put option explicit in the script but why do it if it is not needed?
I took the original script segment, and modified it just a bit, and added an audio bit to it. Now, if you pass the subroutine a string, it will read it out to you, letter by letter... numbers too. It needs a little work on some of the pronunciations, but overall, it does ok. Dunno what use it could be, but if nothing else, it could be fun to play with a bit.
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers
"Would you like to touch my monkey?" - Dieter (Mike Meyers)