0

I am Writing a program which converts latin text to original Language script. this where i have gone so far

' Mapping for Ascii to Unicode
    Private mapAsciiToUnicode() As String = {"h" => "1920","S" => "1921", "n" => "1922", "r" => "1923", "b" => "1924", "L" => "1925", "k" => "1926", "a" => "1927", "v" => "1928", "m" => "1929", "f" => "1930", "d" => "1931", "t" => "1932", "l" => "1933", "g" => "1934", "N" => "1935", "s" => "1936", "D" => "1937", "z" => "1938", "T" => "1939", "y" => "1940", "p" => "1941", "j" => "1942", "C" => "1943", "X" => "1944", "H" => "1945", "K" => "1946", "J" => "1947", "R" => "1948", "x" => "1949", "B" => "1950", "F" => "1951", "Y" => "1952", "Z" => "1953", "A" => "1954", "G" => "1955", "q" => "1956", "V" => "1957", "w" => "1958", "W" => "1959", "i" => "1960", "I" => "1961", "u" => "1962", "U" => "1963", "e" => "1964", "E" => "1965", "o" => "1966", "O" => "1967", "c" => "1968", "," => "1548", ";" => "1563", "?" => "1567", ")" => "0041", "(" => "0040", "Q" => "65010")}

    ' Mapping for Unicode to Ascii
    Private mapUnicodeToAscii() As Array

    ' Mapping for Latin Thaana to Ascii
    Private mapLatinToAscii() As String = {"a" >= "aw", "aa" >= "aW", "aajj" >= "acj", "add" >= "aeDc", "ah" >= "awSc", "aha" >= "awhw", "ari" >= "awri", "au" >= "ao", "b" >= "bc", "ba" >= "bw", "baa" >= "bW", "bai" >= "bwai", "baiy" >= "bwtc", "be" >= "be", "bee" >= "bI", "bey" >= "bE", "bi" >= "bi", "bo" >= "bo", "boo" >= "bU", "bu" >= "bu", "by" >= "bI", "cha" >= "Cw", "chaa" >= "CW", "che" >= "Ce", "cher" >= "Cwr", "chey" >= "CE", "chi" >= "Ci", "cho" >= "Co", "choo" >= "kU", "ci" >= "si", "co" >= "ko", "d" >= "dc", "da" >= "dW", "da " >= "dW", "daa" >= "DW", "dai" >= "Dwai", "dee" >= "dI", "dey" >= "Deac", "dha" >= "dw", "dhaa" >= "dW", "dhe" >= "de", "dhee" >= "dI", "dhey" >= "dE", "dhi" >= "di", "dho" >= "do", "dhoo" >= "dU", "dhu" >= "du", "di" >= "Di", "do" >= "do", "doo" >= "DU", "du" >= "Du", "dy" >= "dI", "e" >= "ae", "ee" >= "aI", "eh" >= "aeac", "evvi" >= "acvi", "ey" >= "E", "f" >= "fc", "fa" >= "fw", "faa" >= "fW", "fah" >= "fwhc", "fahe" >= "fwhI", "fai" >= "fwai", "faiy" >= "fwtc", "fe" >= "fe", "fee" >= "fI", "fey" >= "fE", "ff" >= "fc", "ffi" >= "fi", "fi" >= "fi", "foor" >= "fUrc", "foos" >= "fUsc", "fu" >= "fu", "fy" >= "fI", "ga" >= "gw", "gaa" >= "gW", "gai" >= "gwai", "ge" >= "ge", "gee" >= "gI", "gey" >= "gE", "gha" >= "Gw", "gi" >= "gi", "giou" >= "jw", "go" >= "go", "goo" >= "gU", "gu" >= "gu", "h" >= "hc", "ha" >= "hw", "haa" >= "hW", "hah" >= "hwSc", "hai" >= "hwai", "he" >= "he", "hee" >= "hI", "heed" >= "hIdc", "heem" >= "hImc", "heh" >= "heac", "hey" >= "hE", "hi" >= "hi", "hoo" >= "hU", "hu" >= "hu", "hy" >= "hI", "i" >= "ai", "idh" >= "aidc", "in" >= "ainc", "j" >= "jc", "ja" >= "jw", "jaa" >= "jW", "je" >= "je", "jeed" >= "jIdc", "jey" >= "jE", "ji" >= "ji", "jjey" >= "jE", "jo" >= "jo", "ju" >= "ju", "k" >= "ku", "ka" >= "kw", "kaa" >= "kW", "kah" >= "kwhc", "kaiy" >= "kwtc", "ke" >= "ke", "kee" >= "kI", "key" >= "kE", "kh" >= "Kc", "kha" >= "KW", "khaa" >= "KW", "khi" >= "Ki", "ki" >= "ki", "kka" >= "ackw", "ko" >= "ko", "koo" >= "kU", "koor" >= "kUrc", "ku" >= "ku", "ky" >= "kI", "l" >= "lc", "la" >= "lw", "laa" >= "lW", "le" >= "le", "lee" >= "lI", "lev" >= "leac", "ley" >= "lE", "lha" >= "Lw", "lhe" >= "Le", "lhi" >= "Li", "lhu" >= "Lu", "li" >= "li", "lla" >= "Q", "loa" >= "lO", "loo" >= "lU", "lu" >= "lu", "ly" >= "lI", "m" >= "mc", "ma" >= "mw", "maa" >= "mW", "me" >= "me", "mee" >= "mI", "mey" >= "mE", "mi" >= "mi", "mmai" >= "mWai", "mo" >= "mo", "moo" >= "mU", "mu" >= "mu", "mudh" >= "muac", "my" >= "mI", "n" >= "nc", "na" >= "nw", "na-" >= "nW", "naa" >= "nW", "nah" >= "nwSc", "ne" >= "ne", "nee" >= "nI", "ney" >= "neac", "ni" >= "ni", "noo" >= "nU", "nu" >= "nu", "ny" >= "nI", "o" >= "ao", "of" >= "fo", "oiy" >= "aotc", "oo" >= "aU", "p" >= "pc", "pa" >= "pw", "paa" >= "pW", "pe" >= "pe", "po" >= "po", "py" >= "pI", "q" >= "gc", "qa" >= "qw", "qaa" >= "qW", "qee" >= "qI", "qy" >= "qI", "r" >= "rc", "ra" >= "rw", "raa" >= "rW", "rah" >= "rwSc", "re" >= "re", "ree" >= "rI", "rey" >= "rE", "ri" >= "ri", "ro" >= "ro", "roo" >= "rU", "roof" >= "rUfc", "roon" >= "rUnc", "rra" >= "rw", "ru" >= "ru", "ry" >= "rI", "s" >= "sc", "sa" >= "sw", "saa" >= "sW", "se" >= "se", "see" >= "sI", "sey" >= "sE", "sh" >= "xc", "sha" >= "xw", "shaa" >= "xW", "she" >= "Se", "shee" >= "xI", "shey" >= "SE", "shi" >= "xi", "shu" >= "xu", "si" >= "si", "sion" >= "xwnc", "so" >= "so", "soo" >= "sU", "ss" >= "sc", "ssa" >= "swac", "ssan" >= "swnc", "ssy" >= "sI", "su" >= "su", "suf" >= "sufc", "sy" >= "sI", "t" >= "Tc", "ta" >= "Tw", "te" >= "Te", "tea" >= "TI", "tee" >= "TI", "th" >= "t", "tha" >= "tw", "thaa" >= "tW", "thah" >= "twac", "thee" >= "tI", "thi" >= "ti", "tho" >= "to", "thu" >= "tu", "thy" >= "tI", "too" >= "TU", "ttaa" >= "acTW", "tte" >= "acTe", "u" >= "au", "uddi" >= "acdi", "va" >= "vw", "vaa" >= "vW", "ve" >= "ve", "vee" >= "vI", "vi" >= "vi", "vo" >= "vo", "vu" >= "vu", "vva" >= "acvw", "vvaa" >= "acvW", "w" >= "au", "wa" >= "vw", "waa" >= "vW", "wi" >= "vi", "ya" >= "yw", "yaa" >= "yW", "ye" >= "ye", "yeve" >= "yeve", "yo" >= "yo", "yoo" >= "yU", "yu" >= "yu", "yya" >= "acyw", "yyaa" >= "acyW", "yye" >= "acye", "yyoo" >= "acyU", "0" >= "0", "z" >= "zc", "za" >= "zw", "zee" >= "zI", "zi" >= "zi", "zoo" >= "zU", "zu" >= "zu", "zy" >= "zI"}

    ' Mapping for Ascii to Latin Thaana
    Private mapAsciiToLatin() As Array
Public Function construct()
        ' Prepare the Unicode to Ascii translation map
        mapUnicodeToAscii = Array.Reverse(mapAsciiToUnicode)
        ' Prepare the Ascii to Latin translation map
        mapAsciiToLatin = [U]Array.Reverse(mapLatinToAscii)[/U]  
End Function

The underlined part produces this error - "Expression Does Not Produce a Value", any help would be highly appriciated. And Thanks in advance

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by GeekByChoiCe
1

Array.Reverse is a procedure without a return type.
To fill your arrays you should reverse it and then copy into the array
just like

Private mapAsciiToUnicode() As String = {"h" >= "1920", "S" >= "1921", "n" >= "1922", "r" >= "1923", "b" >= "1924", "L" >= "1925", "k" >= "1926", "a" >= "1927", "v" >= "1928", "m" >= "1929", "f" >= "1930", "d" >= "1931", "t" >= "1932", "l" >= "1933", "g" >= "1934", "N" >= "1935", "s" >= "1936", "D" >= "1937", "z" >= "1938", "T" >= "1939", "y" >= "1940", "p" >= "1941", "j" >= "1942", "C" >= "1943", "X" >= "1944", "H" >= "1945", "K" >= "1946", "J" >= "1947", "R" >= "1948", "x" >= "1949", "B" >= "1950", "F" >= "1951", "Y" >= "1952", "Z" >= "1953", "A" >= "1954", "G" >= "1955", "q" >= "1956", "V" >= "1957", "w" >= "1958", "W" >= "1959", "i" >= "1960", "I" >= "1961", "u" >= "1962", "U" >= "1963", "e" >= "1964", "E" >= "1965", "o" >= "1966", "O" >= "1967", "c" >= "1968", "," >= "1548", ";" >= "1563", "?" >= "1567", ")" >= "0041", "(" >= "0040", "Q" >= "65010)"}

	' Mapping for Unicode to Ascii
	Private mapUnicodeToAscii(mapAsciiToUnicode.Length) As String

	' Mapping for Latin Thaana to Ascii
	Private mapLatinToAscii() As String = {"a" >= "aw", "aa" >= "aW", "aajj" >= "acj", "add" >= "aeDc", "ah" >= "awSc", "aha" >= "awhw", "ari" >= "awri", "au" >= "ao", "b" >= "bc", "ba" >= "bw", "baa" >= "bW", "bai" >= "bwai", "baiy" >= "bwtc", "be" >= "be", "bee" >= "bI", "bey" >= "bE", "bi" >= "bi", "bo" >= "bo", "boo" >= "bU", "bu" >= "bu", "by" >= "bI", "cha" >= "Cw", "chaa" >= "CW", "che" >= "Ce", "cher" >= "Cwr", "chey" >= "CE", "chi" >= "Ci", "cho" >= "Co", "choo" >= "kU", "ci" >= "si", "co" >= "ko", "d" >= "dc", "da" >= "dW", "da " >= "dW", "daa" >= "DW", "dai" >= "Dwai", "dee" >= "dI", "dey" >= "Deac", "dha" >= "dw", "dhaa" >= "dW", "dhe" >= "de", "dhee" >= "dI", "dhey" >= "dE", "dhi" >= "di", "dho" >= "do", "dhoo" >= "dU", "dhu" >= "du", "di" >= "Di", "do" >= "do", "doo" >= "DU", "du" >= "Du", "dy" >= "dI", "e" >= "ae", "ee" >= "aI", "eh" >= "aeac", "evvi" >= "acvi", "ey" >= "E", "f" >= "fc", "fa" >= "fw", "faa" >= "fW", "fah" >= "fwhc", "fahe" >= "fwhI", "fai" >= "fwai", "faiy" >= "fwtc", "fe" >= "fe", "fee" >= "fI", "fey" >= "fE", "ff" >= "fc", "ffi" >= "fi", "fi" >= "fi", "foor" >= "fUrc", "foos" >= "fUsc", "fu" >= "fu", "fy" >= "fI", "ga" >= "gw", "gaa" >= "gW", "gai" >= "gwai", "ge" >= "ge", "gee" >= "gI", "gey" >= "gE", "gha" >= "Gw", "gi" >= "gi", "giou" >= "jw", "go" >= "go", "goo" >= "gU", "gu" >= "gu", "h" >= "hc", "ha" >= "hw", "haa" >= "hW", "hah" >= "hwSc", "hai" >= "hwai", "he" >= "he", "hee" >= "hI", "heed" >= "hIdc", "heem" >= "hImc", "heh" >= "heac", "hey" >= "hE", "hi" >= "hi", "hoo" >= "hU", "hu" >= "hu", "hy" >= "hI", "i" >= "ai", "idh" >= "aidc", "in" >= "ainc", "j" >= "jc", "ja" >= "jw", "jaa" >= "jW", "je" >= "je", "jeed" >= "jIdc", "jey" >= "jE", "ji" >= "ji", "jjey" >= "jE", "jo" >= "jo", "ju" >= "ju", "k" >= "ku", "ka" >= "kw", "kaa" >= "kW", "kah" >= "kwhc", "kaiy" >= "kwtc", "ke" >= "ke", "kee" >= "kI", "key" >= "kE", "kh" >= "Kc", "kha" >= "KW", "khaa" >= "KW", "khi" >= "Ki", "ki" >= "ki", "kka" >= "ackw", "ko" >= "ko", "koo" >= "kU", "koor" >= "kUrc", "ku" >= "ku", "ky" >= "kI", "l" >= "lc", "la" >= "lw", "laa" >= "lW", "le" >= "le", "lee" >= "lI", "lev" >= "leac", "ley" >= "lE", "lha" >= "Lw", "lhe" >= "Le", "lhi" >= "Li", "lhu" >= "Lu", "li" >= "li", "lla" >= "Q", "loa" >= "lO", "loo" >= "lU", "lu" >= "lu", "ly" >= "lI", "m" >= "mc", "ma" >= "mw", "maa" >= "mW", "me" >= "me", "mee" >= "mI", "mey" >= "mE", "mi" >= "mi", "mmai" >= "mWai", "mo" >= "mo", "moo" >= "mU", "mu" >= "mu", "mudh" >= "muac", "my" >= "mI", "n" >= "nc", "na" >= "nw", "na-" >= "nW", "naa" >= "nW", "nah" >= "nwSc", "ne" >= "ne", "nee" >= "nI", "ney" >= "neac", "ni" >= "ni", "noo" >= "nU", "nu" >= "nu", "ny" >= "nI", "o" >= "ao", "of" >= "fo", "oiy" >= "aotc", "oo" >= "aU", "p" >= "pc", "pa" >= "pw", "paa" >= "pW", "pe" >= "pe", "po" >= "po", "py" >= "pI", "q" >= "gc", "qa" >= "qw", "qaa" >= "qW", "qee" >= "qI", "qy" >= "qI", "r" >= "rc", "ra" >= "rw", "raa" >= "rW", "rah" >= "rwSc", "re" >= "re", "ree" >= "rI", "rey" >= "rE", "ri" >= "ri", "ro" >= "ro", "roo" >= "rU", "roof" >= "rUfc", "roon" >= "rUnc", "rra" >= "rw", "ru" >= "ru", "ry" >= "rI", "s" >= "sc", "sa" >= "sw", "saa" >= "sW", "se" >= "se", "see" >= "sI", "sey" >= "sE", "sh" >= "xc", "sha" >= "xw", "shaa" >= "xW", "she" >= "Se", "shee" >= "xI", "shey" >= "SE", "shi" >= "xi", "shu" >= "xu", "si" >= "si", "sion" >= "xwnc", "so" >= "so", "soo" >= "sU", "ss" >= "sc", "ssa" >= "swac", "ssan" >= "swnc", "ssy" >= "sI", "su" >= "su", "suf" >= "sufc", "sy" >= "sI", "t" >= "Tc", "ta" >= "Tw", "te" >= "Te", "tea" >= "TI", "tee" >= "TI", "th" >= "t", "tha" >= "tw", "thaa" >= "tW", "thah" >= "twac", "thee" >= "tI", "thi" >= "ti", "tho" >= "to", "thu" >= "tu", "thy" >= "tI", "too" >= "TU", "ttaa" >= "acTW", "tte" >= "acTe", "u" >= "au", "uddi" >= "acdi", "va" >= "vw", "vaa" >= "vW", "ve" >= "ve", "vee" >= "vI", "vi" >= "vi", "vo" >= "vo", "vu" >= "vu", "vva" >= "acvw", "vvaa" >= "acvW", "w" >= "au", "wa" >= "vw", "waa" >= "vW", "wi" >= "vi", "ya" >= "yw", "yaa" >= "yW", "ye" >= "ye", "yeve" >= "yeve", "yo" >= "yo", "yoo" >= "yU", "yu" >= "yu", "yya" >= "acyw", "yyaa" >= "acyW", "yye" >= "acye", "yyoo" >= "acyU", "0" >= "0", "z" >= "zc", "za" >= "zw", "zee" >= "zI", "zi" >= "zi", "zoo" >= "zU", "zu" >= "zu", "zy" >= "zI"}

	' Mapping for Ascii to Latin Thaana
	Private mapAsciiToLatin(mapLatinToAscii.Length) As String

	Sub Main()
		Array.Reverse(mapAsciiToUnicode)
		Array.Reverse(mapLatinToAscii)
		Array.Copy(mapAsciiToUnicode, mapUnicodeToAscii, mapAsciiToUnicode.Length)
		Array.Copy(mapLatinToAscii, mapAsciiToLatin, mapLatinToAscii.Length)
	End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.