Advertisement
if-then-else

Base Converter

Apr 7th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. --Note that when I told yo Base64 was required for all letters, I meant all letters including lowercase. For Caps you can use Base36.
  2. :{0,...0}->L1
  3. :{0,...0}->L2
  4. :10->A
  5. :11->B...
  6. :35->Z
  7. :Input "NUMBER (LIST)",L1
  8. :Input "FROM BASE:",B
  9. :0->R
  10. --The next part doesn't fully work yet.
  11. :Repeat R=P
  12. :R+1->R
  13. :L1(R)*(B^(P-R))->L2(R)
  14. :End
  15. :sum(L2)->Y
  16. :Display "DEC:",Y
  17. :Stop
  18. --this tries to convert any base to decimal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement