YouTip LogoYouTip

Func Hex

VBScript Hex Function | Novice Tutorial

VBScript Hex Function | Novice Tutorial

Novice Tutorial -- Learning is not just technology, but also dreams!

VBScript Tutorial

VB TutorialVB UsageVB VariablesVB ProceduresVB ConditionalsVB LoopsVB SummaryVB ExamplesVB FunctionsVB Keywords

VBScript Examples

VBScript Keywords

VBScript Hex Function


Image 3: VBScript Reference Manual Complete VBScript Reference Manual


The Hex function returns a string representing the hexadecimal value of a specified number.

Note: If the parameter is not an integer, it is rounded to the nearest integer before operation.

Syntax

Hex(number)
Parameter Description
number Required. Any valid expression. If the number is: * Null - then the Hex function returns Null. * Empty - then the Hex function returns zero (0). * Any other number - then the Hex function returns 8 hexadecimal characters.

Example

Example

document.write(Hex(3) & "
") document.write(Hex(5) & "
") document.write(Hex(9) & "
") document.write(Hex(10) & "
") document.write(Hex(11) & "
") document.write(Hex(12) & "
") document.write(Hex(400) & "
") document.write(Hex(459) & "
") document.write(Hex(460) & "
")

The output of the above example:

3
5
9
A
B
C
190
1CB
1CC

Try it Β»


Image 4: VBScript Reference Manual Complete VBScript Reference Manual

AI is thinking...

VBScript Examples

VBScript Keywords

iFlyTek Xingchen Coding Plan includes free model call quotas, DeepSeek, GLM, Kimi, MiniMax, a one-stop experience and deployment platform. Β₯3.9/ month Subscribe now

Share My Notes

Cancel

Write notes...

Image URL

Image Description

Image Size Γ—

Share Notes

  • Nickname Nickname (required)
  • Email Email (required)
  • Reference URL Reference URL

Category Navigation

← Func OctFunc Cstr β†’