Page 1 of 1
Input and Output of REAL Data
Posted: Thu Jul 30, 2015 11:24 am
by anitasure123
Hello There,
I got the problem when dealing with REAL type data types like when using In.Real and Out.Real(Error – Undefined, but even Reals file is present in Astrobe\Lib\General folder).
Please reply,
Thanks
Anita
Re: Input and Output of REAL Data
Posted: Thu Jul 30, 2015 12:09 pm
by cfbsoftware
The In and Out library modules do not have a procedure called
Real. Refer to Chapter 3
Library Modules in
Help >
Oberon for Cortex-M3 Microcontrollers to see the definitions of all the procedures contained in the library modules.
If you want to input / output REAL data you need to input / output them via strings, using the procedures in the library module
Reals to convert strings to REALs and vice-versa. e.g. the following procedure is taken from the
Extensions module in the General Examples folder:
Code: Select all
PROCEDURE OutReal(r: REAL);
VAR
s: ARRAY 32 OF CHAR;
BEGIN
Reals.RealToStrF(r, 7, s);
Out.String(s)
END OutReal;