Arc Forum
new
|
comments
|
leaders
|
submit
login
How do you print a decimal value?
2 points
by
lark
3897 days ago |
3 comments
I would like to print out a number that contains decimals. How do you do that in Arc?
arc> (pr (/ 3 4)) ; I want to get: 0.75
There's a previous thread on this, but not a function that returns decimals: http://arclanguage.org/item?id=10367
3 points
by
akkartik
3896 days ago |
link
Another thread on this:
http://arclanguage.org/item?id=17342
-----
3 points
by
lark
3897 days ago |
link
Here's how to do it:
arc> (num (/ 3 4)) ".75"
-----
3 points
by
zck
3896 days ago |
link
Documentation on 'num :
http://arclanguage.github.io/ref/string.html#num
-----