beautypg.com

Remote Processing CAMBASIC User Manual

Page 89

background image

Comm ands - 56

HEX$

String Function

SYNTAX:

n$ = HEX$( m)

PURPOSE:

To return a hex representation of a number.

REMARK S:

The value of m may range from 0 to 65,535.

If the number is 255 or less, HEX $ returns a two hex digit result. Larger numbers result in four hex
digits being returned.

RELATED:

none

EXAMPLE:

PRINT HEX$(127)

7F

PRINT HEX$(1280)

0500

ERROR:

< Data negative> – for m
< Data > 65,535> – for m