\START92\ \COMMENT=Program file dated 04/30/99, 20:20 \NAME=basen \FILE=BASEN.92P () Prgm Local n,d,b,c,re,r,dg,l Loop ""\->\n ClrIO Dialog Title "Base-N Converter" Request "Decimal number",d Request "New Base (max:201)",b DropDown "Common Bases",{"none","Hex","Bin","Oct"},c EndDlog If ok=0 Stop expr(b)\->\b expr(d)\->\d If c=2 16\->\b If c=3 2\->\b If c=4 8\->\b Disp "Base 10: "&string(d) While d\!=\0 mod(d,b)\->\r intDiv(d,b)\->\d If r>9 Then Goto le Else string(r)\->\dg dim(dg)\->\l right(dg,l)&n\->\n Cycle EndIf Lbl le char(55+r)\->\dg n&dg\->\n EndWhile Pause "Base "&string(b)&": "&n Request "Convert another(y/n)",re If ok=0 Exit left(re,1)\->\re If re="N" or re="n" Exit EndLoop EndPrgm \STOP92\