comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: Re: Standard."-" provided to "with function "-" (VAL1 : in VALUE_TYPE) return VALUE_TYPE is <>;" refused:
Date: Fri, 6 Apr 2018 13:09:48 -0700 (PDT)
Date: 2018-04-06T13:09:48-07:00	[thread overview]
Message-ID: <8ab72256-60ac-4c43-b7ca-6e8396282f6a@googlegroups.com> (raw)
In-Reply-To: <3c392f24-5b12-4290-9ec6-2dc986bb6530@googlegroups.com>

Here's a minimal, compilable ... and so on ;-)
Well, not compilable because of you know what.
All with-ed things are packages, spreadsheets.formula_cells being a generic child of non-generic spreadsheets.

generic
   type VALUE_TYPE is private;
   with function "-" (VAL1, VAL2 : in VALUE_TYPE) return VALUE_TYPE is <>;
   with function "-" (VAL1 : in VALUE_TYPE) return VALUE_TYPE is <>;
   with function "**" (VAL1 : in Value_Type; VAL2 : in VALUE_TYPE) return VALUE_TYPE is <>;
   with function Factoriel (Val : in Value_Type) return Value_Type is <>;
   with function IMAGE (VAL: in value_type) return STRING;
package NUMERIC_SIGNATURE is end Numeric_Signature;


private with Spreadsheets;
package VIEWS.SPREADSHEET_bis with Elaborate_Body
is
   type SHEET_TYPE is abstract tagged limited private;
private
   use SPREADSHEETs;
   type SHEET_TYPE is abstract new Spreadsheet_Type with null record;

end VIEWS.SPREADSHEET_bis;

private with Spreadsheets;
package VIEWS.SPREADSHEET is
   TYPE SHEET_TYPE is limited private;
private
   use SPREADSHEETs;
   type SHEET_TYPE is new Spreadsheet_Type with null record;
end VIEWS.SPREADSHEET;

with NUMERIC_SIGNATURE, Ada.Text_IO, Ada.Float_Text_IO, ADA.Integer_Text_IO, Spreadsheets.String_Cells, Spreadsheets.Formula_Cells;
use Ada.Text_IO, SPREADSHEETs.String_Cells, Ada.Float_Text_IO, Ada.Integer_Text_IO;
package body VIEWS.SPREADSHEET is
   function Factoriel (Operand : in Float) return FLOAT is separate;
   function "**" (Operand, Exponent : in Float) return Float is separate;
   package P_Num is new NUMERIC_SIGNATURE                   -- L6
(VALUE_TYPE => Float,IMAGE => FLOAT'IMAGE, "-" => Standard."-");
   package Formula_Cells_Package is new Formula_Cells (P_NUM); -- L7
   use Formula_Cells_package;               -- L8
end VIEWS.SPREADSHEET;           -- L9

Same message with this simplified version:
6:04: instantiation abandoned
7:44: named association not allowed for overloaded formal
8:56: "P_NUM" is not visible
8:56: non-visible declaration at spreadsheets-formula_cells.ads:4
8:56: instantiation abandoned
9:08: "Formula_Cells_package" is undefined

  parent reply	other threads:[~2018-04-06 20:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 17:20 Standard."-" provided to "with function "-" (VAL1 : in VALUE_TYPE) return VALUE_TYPE is <>;" refused: Mehdi Saada
2018-04-06 19:43 ` Simon Wright
2018-04-06 20:09 ` Mehdi Saada [this message]
2018-04-06 21:35   ` Simon Wright
2018-04-06 20:37 ` AdaMagica
2018-04-06 21:39   ` Simon Wright
2018-04-06 23:08     ` Mehdi Saada
2018-04-07  0:05     ` Mehdi Saada
2018-04-07 10:17       ` Mehdi Saada
2018-04-07 10:43         ` Mehdi Saada
2018-04-07 13:37           ` Mehdi Saada
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox