Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
CHARACTER txt*80
|
||||
|
||||
num = 36^7 -1 ! 7836416410
|
||||
CALL DecToBase(num, txt, 36)
|
||||
WRITE(ClipBoard, Name) num, txt, BaseToDec(36, txt)
|
||||
END
|
||||
|
||||
FUNCTION BaseToDec(base, string)
|
||||
CHARACTER string
|
||||
BaseToDec = 0
|
||||
length = LEN_TRIM(string)
|
||||
DO i = 1, length
|
||||
n = INDEX("0123456789abcdefghijklmnopqrstuvwxyz", string(i)) - 1
|
||||
BaseToDec = BaseToDec + n * base^(length-i)
|
||||
ENDDO
|
||||
END
|
||||
|
||||
SUBROUTINE DectoBase(decimal, string, base)
|
||||
CHARACTER string
|
||||
string = '0'
|
||||
temp = decimal
|
||||
length = CEILING( LOG(decimal+1, base) )
|
||||
DO i = length, 1, -1
|
||||
n = MOD( temp, base )
|
||||
string(i) = "0123456789abcdefghijklmnopqrstuvwxyz"(n+1)
|
||||
temp = INT(temp / base)
|
||||
ENDDO
|
||||
END
|
||||
|
|
@ -0,0 +1 @@
|
|||
num=7836416410; txt=zzzzzzz; 7836416410;
|
||||
Loading…
Add table
Add a link
Reference in a new issue