products/Sources/formale Sprachen/VDM/VDMPP/SortingPP image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: P.vdmrt   Sprache: Unknown

class P is subclass of DTControl

instance variables

-- design parameters
protected k: real;

operations

-- constructor for PD
public P: real ==> P
P(k_) ==
(
    k := k_;
);
    
-- default constructor for PD
public P: () ==> P
P() ==
    P(DEF_K);

-- calculates output, based on the error
public Output: real ==> real
Output(err) == 
(
 return k * err
);

values

-- defaults
DEF_K: real = 0.2;

end P

[ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ]