|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Please, can anyone convert the following dot net snippet to pascal{ string text1 = ""; double num5 = Strings.Len(T) + 1; int num3 = 7; int num6 = Strings.Len(T); int num1 = 1; while (num1 <= num6) { double num4 = Strings.Asc(Strings.Mid(T, num1, 1)) + (num3 - num1); int num2 = (int) Math.Round((double) ((num4 % 10) + 1)); if (num2 == 0) { num2 = 1; } num3 = num2 + 5; num4 = ((long) Math.Round((double) (num4 * num2))) / ((long) (num2 * 2)); num5 = ((long) Math.Round((double) (num5 * num4))) / ((long) num2); if (num4 < 1) { num4 = 4; } if (num5 > 900000) { num5 = ((long) Math.Round(num5)) / ((long) Math.Round(num4)); } num1++; } text1 = Strings.Left(Strings.LTrim(Conversion.Str(num5)) + "12345678", 8); text1 = Strings.Right(text1, 4) + Strings.Left(text1, 4); num1 = (int) Math.Round((double) (8 - Conversion.Val(Strings.Mid(T, 1, 1)))); if (num1 < 0) { num1 += 9; } StringType.MidStmtStr(ref text1, 1, 1, Strings.Trim(Conversion.Str(num1))); num1 = (int) Math.Round((double) (5 - Conversion.Val(Strings.Mid(T, 6, 1)))); if (num1 < 0) { num1 += 9; } StringType.MidStmtStr(ref text1, 6, 1, Strings.Trim(Conversion.Str(num1))); num1 = (int) Math.Round((double) (9 - Conversion.Val(Strings.Mid(text1, 2, 1)))); if (num1 < 0) { num1 += 9; } StringType.MidStmtStr(ref text1, 4, 1, Strings.Trim(Conversion.Str(num1))); num1 = (int) Math.Round((double) (7 - Conversion.Val(Strings.Mid(text1, 3, 1)))); if (num1 < 0) { num1 += 9; } StringType.MidStmtStr(ref text1, 8, 1, Strings.Trim(Conversion.Str(num1))); num1 = (int) Math.Round((double) (5 - Conversion.Val(Strings.Mid(text1, 5, 1)))); if (num1 < 0) { num1 += 9; } StringType.MidStmtStr(ref text1, 7, 1, Strings.Trim(Conversion.Str(num1))); return text1; } Thanks Karmalax,
You have sent this completely to the wrong newsgroup. Although it are also not the right ones can you have a change in a VBS newsgroup or a VB classic one as microsoft.public.VB.generaldiscussions I hope you have success Cor <karma***@gmail.com> schreef in bericht Show quoteHide quote news:1157191814.981056.49760@h48g2000cwc.googlegroups.com... > public static string Somme(string T) > > { > > string text1 = ""; > > double num5 = Strings.Len(T) + 1; > > int num3 = 7; > > int num6 = Strings.Len(T); > > int num1 = 1; > > while (num1 <= num6) > > { > > double num4 = Strings.Asc(Strings.Mid(T, num1, 1)) + (num3 > - num1); > > int num2 = (int) Math.Round((double) ((num4 % 10) + 1)); > > if (num2 == 0) > > { > > num2 = 1; > > } > > num3 = num2 + 5; > > num4 = ((long) Math.Round((double) (num4 * num2))) / > ((long) (num2 * 2)); > > num5 = ((long) Math.Round((double) (num5 * num4))) / > ((long) num2); > > if (num4 < 1) > > { > > num4 = 4; > > } > > if (num5 > 900000) > > { > > num5 = ((long) Math.Round(num5)) / ((long) > Math.Round(num4)); > > } > > num1++; > > } > > text1 = Strings.Left(Strings.LTrim(Conversion.Str(num5)) + > "12345678", 8); > > text1 = Strings.Right(text1, 4) + Strings.Left(text1, 4); > > num1 = (int) Math.Round((double) (8 - > Conversion.Val(Strings.Mid(T, 1, 1)))); > > if (num1 < 0) > > { > > num1 += 9; > > } > > StringType.MidStmtStr(ref text1, 1, 1, > Strings.Trim(Conversion.Str(num1))); > > num1 = (int) Math.Round((double) (5 - > Conversion.Val(Strings.Mid(T, 6, 1)))); > > if (num1 < 0) > > { > > num1 += 9; > > } > > StringType.MidStmtStr(ref text1, 6, 1, > Strings.Trim(Conversion.Str(num1))); > > num1 = (int) Math.Round((double) (9 - > Conversion.Val(Strings.Mid(text1, 2, 1)))); > > if (num1 < 0) > > { > > num1 += 9; > > } > > StringType.MidStmtStr(ref text1, 4, 1, > Strings.Trim(Conversion.Str(num1))); > > num1 = (int) Math.Round((double) (7 - > Conversion.Val(Strings.Mid(text1, 3, 1)))); > > if (num1 < 0) > > { > > num1 += 9; > > } > > StringType.MidStmtStr(ref text1, 8, 1, > Strings.Trim(Conversion.Str(num1))); > > num1 = (int) Math.Round((double) (5 - > Conversion.Val(Strings.Mid(text1, 5, 1)))); > > if (num1 < 0) > > { > > num1 += 9; > > } > > StringType.MidStmtStr(ref text1, 7, 1, > Strings.Trim(Conversion.Str(num1))); > > return text1; > > } > > > > Thanks > Please accept my apologies.
Thank you Cor Ligthert [MVP] ha scritto: Show quoteHide quote > Karmalax, > > You have sent this completely to the wrong newsgroup. > > Although it are also not the right ones can you have a change in a VBS > newsgroup or a VB classic one as > > microsoft.public.VB.generaldiscussions > > I hope you have success > > Cor s > > Karmalax,
> Please accept my apologies. Not any need for, it was just to help you to find your solution, which > Thank you should not be given here because of your question. It is like to go to a grocery shop to change a million Dollars to Euros. It can be done, however in my country the grocery guy can wait that he be arrested because he probably is helping whitewashing. I don't know the name in English for that. Cor Show quoteHide quote > > > Cor Ligthert [MVP] ha scritto: > >> Karmalax, >> >> You have sent this completely to the wrong newsgroup. >> >> Although it are also not the right ones can you have a change in a VBS >> newsgroup or a VB classic one as >> >> microsoft.public.VB.generaldiscussions >> >> I hope you have success >> >> Cor > s >> > >
Show quote
Hide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message "Money Laundering"news:eg7HnAqzGHA.4920@TK2MSFTNGP06.phx.gbl... : Karmalax, : : > Please accept my apologies. : > Thank you : : Not any need for, it was just to help you to find your solution, which : should not be given here because of your question. It is like to go to : a grocery shop to change a million Dollars to Euros. : : It can be done, however in my country the grocery guy can wait that he be : arrested because he probably is helping whitewashing. I don't know the : name in English for that. Anon,
Thanx, so obvious. :-) CorShow quoteHide quote "_AnonCoward" <abc***@uvwxyz.com> schreef in bericht news:SiDKg.3206$Md4.2110@tornado.southeast.rr.com... > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:eg7HnAqzGHA.4920@TK2MSFTNGP06.phx.gbl... > : Karmalax, > : > : > Please accept my apologies. > : > Thank you > : > : Not any need for, it was just to help you to find your solution, which > : should not be given here because of your question. It is like to go to > : a grocery shop to change a million Dollars to Euros. > : > : It can be done, however in my country the grocery guy can wait that he > be > : arrested because he probably is helping whitewashing. I don't know the > : name in English for that. > > > "Money Laundering" > > >
Structures, Classes for storing data
Changing the text of a Command Button using SetWindowText Validating emails how to add dynamic tooltip when dragging scrollbar of datagridview Appending text to an array of textboxes VB .NET FTP Convert Access Table to Text File using VB what is wrong with this StreamWriter, FileStream throwing uncatchable NullReferenceException Is there a Library or component for creating HTML? |
|||||||||||||||||||||||