The POW()
function computes the power of a number.
DECLARE FUNCTION POW AS FLOAT (base AS FLOAT, exp AS FLOAT) SHARED STATIC INLINE DECLARE FUNCTION POW AS LONG (base AS INT, exp AS BYTE) OVERLOAD SHARED STATIC INLINE
Note
The CBM BASIC expression base↑exp
can be translated to XC=BASIC as POW(base, exp)
.
PRINT POW(2, 10) : REM outputs 1024