خانه > lang > hex 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar id vi ko ja ru zh zh_TW eo
قبلی  بعدی  ویرایش  تغییر نام  واگرد  Search  سرپرستی  
مستندات  
اخطار! این صفحه ترجمه نشده است.  مشاهده نسخه انگلیسی 
Hex$
String = Hex$ ( Number AS Long [ , Digits AS Integer ] )

Gets the hexadecimal representation of a number.

If Digits is specified, the representation is padded with unnecessary zeros so that Digits digits are returned.

مثال

PRINT Hex$(1972)

7B4

PRINT Hex$(1972, 8)

000007B4

The sign of a Short or Integer will be extended, because the Number will be extended to Long . If the hexadecimal representation should be limited to 16 bits the AND operator must be used.

DIM bX AS Byte ' 8 bits unsigned
DIM sX AS Short ' 16 Bits signed

bX = 200
sX = -456
PRINT Hex$(bX), Hex$(sX), Hex$(CLong(sX) AND &hffff&)

C8 FFFFFFFFFFFFFE38 FE38

همچنین مشاهده کنید

توابع قالب بندی