Chapter 3 Ada Language Reference
AutoCode Reference 3-28 ni.com
Sample Package

Example3-3 shows a generated RT_FIXED_OPERATORS package.

Example 3-3 Generated RT_FIXED_OPERATORS Package
---------------------------------------------------------------------------
-- AutoCode/Ada (TM) Code Generator 7.X --
-- National Instruments Corporation, Austin, Texas --
---------------------------------------------------------------------------
-- rtf filename : feed.rtf
-- Filename : fxp_feed_.a
-- Dac filename : ada_sim.dac
-- Generated on : Fri Jun 2 14:44:02 1999
-- Dac file created on : Thu Jun 1 16:19:31 1999
--
-- Fixed Point Operator Instantiation Package
--
--
with SA_TYPES;
with SA_FIXED;
with SA_FIXED_GENERICS;
package RT_FIXED_OPERATORS is
-- Operator Instantiations --
function "+" is new SA_FIXED_GENERICS.FIXED_ADD(
SA_FIXED.RT_SSHORT15,
SA_FIXED.RT_SSHORT15,
SA_FIXED.RT_SSHORT15,
SA_FIXED.RT_SLONG15);
--pragma inline ("+");
function “-” is new SA_FIXED_GENERICS.FIXED_SUB(
SA_FIXED.RT_USHORT13,
SA_FIXED.RT_USHORT15,
SA_FIXED.RT_SSHORT12,
SA_FIXED.RT_ULONG12);
--pragma inline ("-");
function "-" is new SA_FIXED_GENERICS.FIXED_SUB(
SA_FIXED.RT_SSHORT12,
SA_FIXED.RT_SSHORT15,
SA_FIXED.RT_SSHORT14,
SA_FIXED.RT_SLONG14);
--pragma inline ("-");