IN (Statement)


Reads data from the I/O port designated by an I/O variable.


IN <Arithmetic variable name> = <I/O variable>


This statement assigns the I/O port data designated by <I/O variable> to the variable designated by <Arithmetic variable name>.
The <I/O variable> is declared using a DEFIO statement or an I/O variable.



When the content declared as a SINGLE type I/O variable cannot be expressed as a single precision real number, error 777F (real number conversion failure) will occur.


DEFINT Li1, Li2
DEFIO samp1 = INTEGER, 220
'Declares samp1 as an INTEGER type I/O variable
'beginning at port 220.
IN Li1 = samp1
'Assigns the samp1 data to Li1.
IN Li2 = IO[240]
'Assigns the port 240 data to Li2.
OUT samp1 = Li1
'Outputs the Li1 data from the port declared in samp1.
OUT IO[240] = Li2
'Outputs the Li2 data from port 240.


Top