to-octal: func [
"Converts an integer to an octal issue!."
value [integer!] "Value to be converted"
/width wd
/local result pad
][
pad: func [val wd] [head insert/dup val #"0" wd - length? val]
result: copy # ; empty issue!
if 0 = value [return pad result any [wd 1]]
while [0 <> value] [
insert result value // 8
value: round/down value / 8
]
pad result any [wd 1]
]
You need to create an account or log in to post comments to this site.