Page 1 of 1

Posted: Thu Oct 03, 2002 2:28 pm
by BackupUser
Restored from previous forum. Originally posted by flim.

how to convert hex number to integer?

Posted: Thu Oct 03, 2002 2:39 pm
by BackupUser
Restored from previous forum. Originally posted by PB.

> how to convert hex number to integer?

Code: Select all

Procedure.l hex2dec(h$)
  h$=UCase(h$)
  For r=1 To Len(h$)
    d60
      d+Asc(a$)-55
    Else
      d+Asc(a$)-48
    EndIf
  Next
  ProcedureReturn d
EndProcedure
;
Debug hex2dec("FF")

PB - Registered PureBasic Coder

Posted: Fri Oct 04, 2002 3:25 am
by BackupUser
Restored from previous forum. Originally posted by flim.

:) thank you