-- DERECHOS DE AUTOR ING. MARCO T. GONZALEZ
-- DESARROLLO CREATIVO S.A.
-- LICENCIA DE USO A DENEINSA
-- SECRETO COMERCIAL PROTEGIDO POR ACUERDO DE NO DIVULGACION

Create or Replace PACKAGE Convmedida IS

   procedure ObtenerMedida(Vmed in varchar2, Vfactor out number, Vbase out varchar2,
                           formula out varchar2, basecan out varchar2, expcan out number);
   PRAGMA RESTRICT_REFERENCES (ObtenerMedida, WNDS, WNPS);

   procedure FijarMedida(Vcant in number, Vmed in varchar2);

   function FactorEstandar(Vcant in number, Vmed in varchar2) return number;
   PRAGMA RESTRICT_REFERENCES (FactorEstandar, WNDS, WNPS);

   function MedidaArt(VCia in char, VArt in varchar2) return varchar2;
   PRAGMA RESTRICT_REFERENCES (MedidaArt, WNDS, WNPS);

   Procedure ExtraerCan(formCan in out varchar2, facRaiz out number, denExp out number, facLib out number);
   PRAGMA RESTRICT_REFERENCES (ExtraerCan, WNDS, WNPS);

   Function Convertir(Vcant in number, VmedOrig in varchar2, VmedDest in varchar2) return number;

   Procedure CalcularCanonica(medida in char, factor in number, medbase in char, exponente in number,
                              faccan out varchar2, medcan out varchar2, expcan out number);

END;
/
