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
Input and Output of REAL Data
-
- Site Admin
- Posts: 525
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: Input and Output of REAL Data
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:
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;