QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The &O prefix denotes that an integer value is expressed in an Octal base 8 format.

Syntax

a& = &O12345671234

Example(s)

Example: The maximum octal values of decimal value -1 in each numerical type are:


c&& = -1: d& = -1: e% = -1: f%% = -1
oc$ = OCT$(f%%)
PRINT "Max octal _BYTE = "; oc$; " with"; LEN(oc$); "digits ="; VAL("&O" + oc$)
oc$ = OCT$(e%)
PRINT "Max octal INTEGER = "; oc$; " with"; LEN(oc$); "digits ="; VAL("&O" + oc$)
oc$ = OCT$(d&)
PRINT "Max octal LONG = "; oc$; " with"; LEN(oc$); "digits ="; VAL("&O}}" + oc$)
oc$ = OCT$(c&&)
PRINT "Max octal _INTEGER64 = "; oc$; " with"; LEN(oc$); "digits ="; VAL("&O" + oc$)


Max octal _BYTE = 377 with 3 digits = 255
Max octal INTEGER = 177777 with 6 digits = 65535
Max octal LONG = 37777777777 with 11 digits = 4294967295
Max octal _INTEGER64 = 1777777777777777777777 with 22 digits =-1

See Also