home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / prgs / shellutils / base.b next >
Text File  |  1995-07-26  |  312b  |  21 lines

  1. deflng x
  2.  
  3. SUB usage
  4.   print "usage: base <decimal number>"
  5.   stop
  6. END SUB
  7.  
  8. if argcount<>1 then
  9.   usage
  10. else
  11.   if arg$(1)="?" then 
  12.     usage
  13.   else
  14.     x=val(arg$(1))
  15.     print "    Decimal:";x
  16.     print "Hexadecimal: ";hex$(x)
  17.     print "      Octal: ";oct$(x)
  18.     print "     Binary: ";bin$(x)
  19.   end if
  20. end if
  21.