cmm move small aps into cmm/misc folder
git-svn-id: svn://kolibrios.org@7911 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
10
programs/cmm/experimental/python/examples/dectohex.py
Normal file
10
programs/cmm/experimental/python/examples/dectohex.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def test(x):
|
||||
f = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']
|
||||
txt = ""
|
||||
while x:
|
||||
txt = f[x&0xF]+txt
|
||||
x = x>>4
|
||||
|
||||
return txt
|
||||
|
||||
stdout(test(0x123454))
|
Reference in New Issue
Block a user