Post Reply 
50G custom units conversions
09-07-2014, 02:02 AM
Post: #3
RE: 50G custom units conversions
Thanks rkf, lets see what you've done, i made this but I don't like the way the conversion is left on the stack after some conversions.
please help me with any ideas or code examples ect ect
also I didn't know what to call this, i put it in its own directory and call it ...
'CONV'
Code:
%%HP: T(3)A(D)F(.);
\<< { { "Bit" {
  \<< "Bit" \->TAG DUP 1048576 / 'MBI' STO
  \>>
  \<< MBI 1048576 * "Bit" \->TAG
  \>> } } { "Byte" {
  \<< "Byte" \->TAG DUP 131072 / 'MBI' STO
  \>>
  \<< MBI 131072 * "Byte" \->TAG
  \>> } } { "KBit" {
  \<< "KBit" \->TAG DUP 1024 / 'MBI' STO
  \>>
  \<< MBI 1024 * "KBit" \->TAG
  \>> } } { "KByte" {
  \<< "KByte" \->TAG DUP 128 / 'MBI' STO
  \>>
  \<< MBI 128 * "KByte" \->TAG
  \>> } } { "MBit" {
  \<< "MBit" \->TAG DUP 1 / 'MBI' STO
  \>>
  \<< MBI 1 * "MBit" \->TAG
  \>> } } { "MByte" {
  \<< "MByte" \->TAG DUP .125 / 'MBI' STO
  \>>
  \<< MBI .125 * "MByte" \->TAG
  \>> } } { "GBit" {
  \<< "GBit" \->TAG DUP .0009765625 / 'MBI' STO
  \>>
  \<< MBI .0009765625 * "GBit" \->TAG
  \>> } } { "GByte" {
  \<< "GByte" \->TAG DUP 1.220703125E-4 / 'MBI' STO
  \>>
  \<< MBI 1.220703125E-4 * "GByte" \->TAG
  \>> } } { "TerByte" {
  \<< "TerByte" \->TAG DUP 1.19209289551E-7 / 'MBI' STO
  \>>
  \<< MBI 1.19209289551E-7 * "TerByte" \->TAG
  \>> } } { "PetByte" {
  \<< "PetByte" \->TAG DUP 1.16415321827E-10 / 'MBI' STO
  \>>
  \<< MBI 1.16415321827E-10 * "PetByte" \->TAG
  \>> } } } MENU
\>>

this is untested but is intended to convert between units using the softkey menu,
enter a number and hit the softkey for the type of unit, then the left shift key and the unit you want to convert to. This converts between computer storage units and might be useful once completed.
thanks for any input..

Thanks
~~~~8< Art >8~~~~

PS: Please post more 50G stuff :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
50G custom units conversions - CosmicTruth - 09-06-2014, 01:29 AM
RE: 50G custom units conversions - rkf - 09-06-2014, 07:17 PM
RE: 50G custom units conversions - rkf - 09-08-2014, 08:36 AM
RE: 50G custom units conversions - CosmicTruth - 09-07-2014 02:02 AM
RE: 50G custom units conversions - rkf - 09-09-2014, 06:49 AM
RE: 50G custom units conversions - rkf - 09-17-2014, 11:57 AM



User(s) browsing this thread: 2 Guest(s)