English
Source / code snippets

Dezimalzahl Hexadezimalzahl Zahlenumwandlung

 

Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Zahlenumwandlung (Dezimalzahl in Hexadezimalzahl)
executable ex Profan-Version 5.0
IntToHex
(c) 1996 Thomas Hölzer, Johann-Hus-Str. 8, 57078 Siegen
Contact: thoelzer@tehsoft.de
http://www.prfellow.de
a (Long)-Integerwert in Hex transfiguring (How Hex$ ex Profan 5)
Parameter: Vorzeichenloser Longint
Def HiByte(1) Div&(&(1),$100)
Def LoByte(1) And(&(1),$FF)
Def HiWord(1) Div&(&(1),$10000)
Def LoWord(1) And(&(1),$FFFF)
Def byte2Hex(1) Add$(Mid$(0123456789ABCDEF,Add(Div&(%(1),16),1),1),
Mid$(0123456789ABCDEF,Add(Mod(%(1),16),1),1))

Proc IntToHex

    Parameters z&
    Declare hx$,hiw&,low&

    Proc Word2Hex

        Parameters z%
        Return  Add$(byte2Hex(HiByte(z%)),byte2Hex(LoByte(z%)))

    ENDPROC

    Let low&=LoWord(z&)
    Let hiw&=HiWord(z&)

    If hiw&

        Word2Hex hiw&
        Let hx$=$(0)

    Else

        Let hx$=0000

    EndIf

    If low&

        Word2Hex low&
        Let hx$=hx$;$(0)

    Else

        Let hx$=hx$;0000

    EndIf

    While Equ$(Mid$(hx$,1,1),0)

        Let hx$=Del$(hx$,1,1)

    Wend

    Let hx$=$;hx$
    Case Equ(Len(hx$),1): Let hx$=$0
    Return hx$

ENDPROC

example
Declare Test$
Cls

WhileNot Equ(%button,2)

    Let Test$=Input$(Dezimalzahl prompt - Hex appear in the cover,$(0),)
    Case Equ(%button,1): IntToHex Test$

Wend

 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.626 Views

Untitledvor 0 min.
Uwe Lang vor 22 Tagen
E.T.01/14/24
RudiB.04/01/20
Julian Schmidt10/13/11
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie