I'm sure at some point I've done this, but now I can't find the example.
Let's say I'm wanting to express a heading to navigate. Formally, instead of saying "heading 45," you would say "heading 045 degrees."
So, if I calculate a heading of 45, how would I then print that as 045? In hex, you'd use
c$ = Right$("0000" + Hex$(n), 4)
to always show leading 0s if the hex value otherwise might consist of less than four characters. I'm pretty sure there's a way of doing this sort of thing directly with decimal numbers?
Thanks, guys. I couldn't figure out where to find this in the wiki.
Let's say I'm wanting to express a heading to navigate. Formally, instead of saying "heading 45," you would say "heading 045 degrees."
So, if I calculate a heading of 45, how would I then print that as 045? In hex, you'd use
c$ = Right$("0000" + Hex$(n), 4)
to always show leading 0s if the hex value otherwise might consist of less than four characters. I'm pretty sure there's a way of doing this sort of thing directly with decimal numbers?
Thanks, guys. I couldn't figure out where to find this in the wiki.