MAINSAIL Language Manual, Section 32.92

previous   next   top   contents   index   framed top   this page unframed


32.92. cvlr

Figure 32–100. cvlr (GENERIC)
$BUILTIN COMPILETIME
LONG REAL
PROCEDURE   cvlr        (INTEGER x);

$BUILTIN COMPILETIME
LONG REAL
PROCEDURE   cvlr        (REAL x);

LONG REAL
PROCEDURE   cvlr        (STRING s);

$BUILTIN COMPILETIME
LONG REAL
PROCEDURE   cvlr        (LONG INTEGER x);

$BUILTIN COMPILETIME
LONG REAL
PROCEDURE   cvlr        (LONG REAL x);

cvlr converts to LONG REAL.

The (LONG) INTEGER forms convert x to a LONG REAL with an equivalent mathematical value, provided that the value of x can be represented exactly as a LONG REAL value; otherwise, the result is rounded or truncated in an unspecified direction.

The REAL form converts to a different internal format, if necessary.

The LONG REAL form returns its argument.

If s is a STRING, x := cvlr(s) has the same effect as r := s; read(r,x), where r is a temporary STRING variable.

Example 32–101. Use of cvlr
cvlr(1)                           = 1.L
cvlr("The value is 123.1234E-23") = 123.1234E-23L


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 32.92