To properly display this page you need a browser with JavaScript support.
HTBasic Help
×
Menu
Index
Search
Search
HTBasic User Guide
CSUB Toolkit
REAL Variables
Previous page
Next page
Print version
(c) TransEra Corp, 2021
To properly display this page you need a browser with JavaScript support.
REAL Variables
A REAL variable is defined as a double in C. You are passed a pointer to the data location. This example shows how to access a REAL variable from a C routine.
BASIC Program
10 REAL R
20 R=512
30 CALL Rdv4( R )
40 PRINT R
50 END
60 SUB Rdv4( A )
70 A = A / 4.0
80 SUBEND
Prototype
1 END
10 SUB Rdv4( A )
20 SUBEND
C Program
#include "csub.h"
rdv4( npar, a )
int npar; /* number of parameters */
realptr a; /* real data pointer */
{
*a = *a / 4.0; /* return a new value */
return( 0 ); /* no errors */
}