123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
Check a string to see if it is Hex

--------------------------------------------------------------------------------



Function IsHex(value)
Dim b, bb, i, j, s, values(15)

s = UCase(value)

values(0) = "0"
values(1) = "1"
values(2) = "2"
values(3) = "3"
values(4) = "4"
values(5) = "5"
values(6) = "6"
values(7) = "7"
values(8) = "8"
values(9) = "9"
values(10) = "A"
values(11) = "B"
values(12) = "C"
values(13) = "D"
values(14) = "E"
values(15) = "F"

bb = (Len(s) > 0)
For i = 1 To Len(s)
b = False
For j = 0 To 15
b = b Or (Mid(s, i, 1) = values(j))
Next
bb = bb And b
Next

IsHex = bb
End Function

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG