(Using the GW-BASIC User's Guide documentation for OCT$ as a template.)
Purpose:
To convert a decimal value to an octal value.
Syntax:
OCT$(x)
Comments:
- Although GW-BASIC will round x to an integer before OCT$(x) is evaluated, BAM does not round the number, instead also coverting the numeric part after the point from decimal to octal too.
- Octal numbers are numbers to the base 8 rather than base 10 (decimal numbers).
Examples:
PRINT OCT$(18)
Result: 22
(Decimal 18 equals octal 22.)
No comments:
Post a Comment