Hi,
I am having trouble translating the following lines of Visual Basic
code to C.
For iCounter = Len(sReference) To 1 Step -1
iSum = iSum + Val(Mid(sRefere nce, iCounter, 1)) * iMultiplier
Next
fReferenceCheck Sum = Right(Str(10 - (iSum Mod 10)), 1)
Any ideas anyone? I have had some help, but I need to know how C's FOR
loops looks like, and how "Val(Mid.." and "Right(Str. .." are
translated into C. Any further help would be greatly appreciated.
Thanks,
Kenneth
I am having trouble translating the following lines of Visual Basic
code to C.
For iCounter = Len(sReference) To 1 Step -1
iSum = iSum + Val(Mid(sRefere nce, iCounter, 1)) * iMultiplier
Next
fReferenceCheck Sum = Right(Str(10 - (iSum Mod 10)), 1)
Any ideas anyone? I have had some help, but I need to know how C's FOR
loops looks like, and how "Val(Mid.." and "Right(Str. .." are
translated into C. Any further help would be greatly appreciated.
Thanks,
Kenneth
Comment