Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  method.tst   Sprache: unbekannt

 
gap> START_TEST("method.tst");
gap> InstallMethod(Integers, [IsInt], function(n) return n; end);
Error, <opr> is not an operation
gap> InstallMethod(Size, [IsInt], function(n) return n; end);
Error, required filters [ "IsInt", "IsRat", "IsCyc", "IsExtAElement", 
  "IsNearAdditiveElement", "IsNearAdditiveElementWithZero", 
  "IsNearAdditiveElementWithInverse", "IsAdditiveElement", "IsExtLElement", 
  "IsExtRElement", "IsMultiplicativeElement", "IsMultiplicativeElementWithOne"
    , "IsMultiplicativeElementWithInverse", "IsZDFRE", "IsAssociativeElement",
  "IsAdditivelyCommutativeElement", "IsCommutativeElement", "IsCyclotomic" ]
for 1st argument do not match a declaration of Size
gap> InstallTrueMethod( IsInternalRep, IsList );
Error, <tofilt> must not involve new representation filters
gap> InstallTrueMethod( IsDenseCoeffVectorRep, IsList );
Error, <tofilt> must not involve new representation filters
gap> InstallTrueMethod( IsInternalRep, IsSmallIntRep );
gap> InstallTrueMethod( IsList and IsInternalRep, IsList and IsSmallIntRep );

# Check names are set correctly
gap> cheese := NewOperation("cheese", [IsObject]);
<Operation "cheese">

# These are in lists as assignments of the form 'f := x -> x' set the name
# of the function to 'f'
gap> funcs := [x -> x, x -> x, x -> x];;;
gap> ranks := [{} -> 10, {} -> 10, {} -> 10];;
gap> SetNameFunction(funcs[3], "func3");
gap> SetNameFunction(ranks[3], "rank3");
gap> InstallMethod(cheese, [IsInt], ranks[1], funcs[1]);
gap> InstallMethod(cheese, "for a list", [IsList], ranks[2], funcs[2]);
gap> InstallMethod(cheese, "for a string", [IsString], ranks[3], funcs[3]);
gap> List(Concatenation(funcs, ranks), NameFunction);
[ "cheese method", "cheese for a list", "func3", 
  "Priority calculation for cheese", 
  "Priority calculation for cheese for a list", "rank3" ]
gap> STOP_TEST("method.tst");

[ Dauer der Verarbeitung: 0.24 Sekunden  (vorverarbeitet)  ]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge