############################################################################# ## ## This file is part of GAP, a system for computational discrete algebra. ## This file's authors include Thomas Breuer, Frank Celler. ## ## Copyright of GAP belongs to its developers, whose names are too numerous ## to list here. Please refer to the COPYRIGHT file for details. ## ## SPDX-License-Identifier: GPL-2.0-or-later ## ## This file contains methods for records. ## Compared to &GAP; 3, where records were used to represent domains and ## all kinds of external arithmetic objects, in &GAP; 4 there is no ## important role for records. ## So the standard library provides only methods for `PrintObj', `String', ## `=', and `<', and the latter two are not installed to compare records ## with objects in other families. ##
############################################################################# ## #A RecNames( <record> ) ## ## <#GAPDoc Label="RecNames"> ## <ManSection> ## <Attr Name="RecNames" Arg='record'/> ## ## <Description> ## returns a duplicate-free list of strings corresponding to the names of ## the record components of the record <A>record</A>. ## <P/> ## The list is sorted by <Ref Func="RNamObj" Label="for a string"/> ## for reasons of efficiency; see <Ref Oper="SortBy"/>. ## Therefore the ordering is consistent within one &GAP; session, ## but it is not necessarily consistent across different sessions. ## To obtain a result that is consistent across &GAP; sessions, ## apply <Ref Oper="Set"/> to the returned list. ## <P/> ## Note that given a string <C>name</C> containing the name of a record ## component, you can access the record component via ## <C><A>record</A>.(name)</C>, ## see Sections <Ref Sect="Accessing Record Elements"/> ## and <Ref Sect="Record Assignment"/>. ## <P/> ## <Example><![CDATA[ ## gap> r := rec( a := 1, b := 2 );; ## gap> Set(RecNames( r )); # 'Set' because ordering depends on GAP session ## [ "a", "b" ] ## gap> Set(RecNames( r ), x -> r.(x)); ## [ 1, 2 ] ## ]]></Example> ## <P/> ## Note that it is most efficient to assign components to a (new or old) ## record in the order given by <Ref Attr="RecNames" Style="Text"/>. ## </Description> ## </ManSection> ## <#/GAPDoc> ##
DeclareAttribute( "RecNames", IsRecord );
############################################################################# ## #F NamesOfComponents( <comobj> ) ## ## <#GAPDoc Label="NamesOfComponents"> ## <ManSection> ## <Func Name="NamesOfComponents" Arg='comobj'/> ## ## <Description> ## For a component object <A>comobj</A>, ## <Ref Func="NamesOfComponents"/> returns a list of strings, ## which are the names of components currently bound in <A>comobj</A>. ## <P/> ## For a record <A>comobj</A> in internal representation, ## <Ref Func="NamesOfComponents"/> returns the result of ## <Ref Attr="RecNames"/>. ## </Description> ## </ManSection> ## <#/GAPDoc> ##
DeclareGlobalFunction( "NamesOfComponents" );
############################################################################# ## #V IdentifierLetters . . . . . . . .characters allowed in normal identifiers ## ## This is used to produce warning messages when the XxxxGlobal functions ## are applied to a name which could not be read in by the parser without ## escapes ##
IsSet( IdentifierLetters ); # ensure GAP knows that this is a set
############################################################################# ## #F SetNamesForFunctionsInRecord( <rec-name>[, <record> ][, <field-names>]) ## ## set the names of functions bound to components of a record. ##
DeclareGlobalFunction("SetNamesForFunctionsInRecord");
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.4Angebot
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.