HTBasic Help
×
Menu
Index

REAL

Converts an INTEGER or COMPLEX number to REAL.
 
 REAL(numeric-expression)
 
Usage:
PRINT REAL(Z)
DRAW REAL(C),IMAG(C)
Example: REAL.BAS
Description:
The real part of a complex number is returned with REAL, and the imaginary part with IMAG. To express the parts of a complex number in polar form, use ABS and ARG:
PRINT "Rectangular form: Real = ";REAL(Z),"Imag =";IMAG(Z)
PRINT "Polar form: Magnitude = ";ABS(Z),"Angle = ";ARG(Z)
See Also: