Saturday, July 9, 2022

๐Ÿ†• OCT$ Function

(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

๐Ÿ–ฅ Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...