13.07.2015 Views

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

TRABAJO DE GRADUACIÓN - DSpace Universidad Don Bosco

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

'current value, and adds to it, so the'previous value isn't lost. Because single'digit hex values can be up to a value of 15,'the decimal value of 10 would be 16. Now,'values are not their own when they are not'their own if they aren't the first character'of the string. Here, we use exponents..'if 16^0 were 0, then I would have done this'diffrently, but because it isn't, it has to'be it's position(a) -1. The -1 is because'you don't multiply by 16 on the first'character, you start it on the 2nd character.End IfElseSelect Case LCase$(Temp)'Because single digit hex values can go up to'15, more characters were needed, so A - F'were added in. A has the value of 10, B has'the value of 11, and so forth. G is not a'valid character because it is a 15 value'system. Here, it just goes through the'valid letters, and does the same thing it did'with numbers.Case "a"If A = 1 ThenrValue = HexAElserValue = rValue + (HexA * (16 ^ (A - 1)))End IfCase "b"If A = 1 ThenrValue = HexBElserValue = rValue + (HexB * (16 ^ (A - 1)))End IfCase "c"If A = 1 ThenrValue = HexCElserValue = rValue + (HexC * (16 ^ (A - 1)))End IfCase "d"If A = 1 ThenrValue = Hex<strong>DE</strong>lserValue = rValue + (HexD * (16 ^ (A - 1)))End IfCase "e"If A = 1 ThenrValue = HexEElserValue = rValue + (HexE * (16 ^ (A - 1)))End IfCase "f"If A = 1 ThenrValue = HexFElserValue = rValue + (HexF * (16 ^ (A - 1)))End IfEnd SelectEnd IfDoEvents'ALWAYS have this in loops.. you don't know how slow'the computer it's being operated on is, the lack of'DoEvents could cause the computer freeze up'temporerily, or even force you to force shutdown.Next AConvertHexToDecimal = rValue'Sends the value that has been made out :)End Function- 162 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!