1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#######################################################################
##
#W test.gd GAP OpenMath Package Andrew Solomon
#W Marco Costantini
##
#Y Copyright (C) 1999, 2000, 2001, 2006
#Y School Math and Comp. Sci., University of St. Andrews, Scotland
#Y Copyright (C) 2004, 2005, 2006 Marco Costantini
##
## testing function
##
#######################################################################
##
#F OMTestXML( <obj> )
##
## <#GAPDoc Label="OMTestXML">
## <ManSection>
## <Func Name="OMTestXML" Arg="obj" />
## <Func Name="OMTest" Arg="obj" />
## <Description>
## Converts <A>obj</A> to XML &OpenMath; and back. Returns true if and
## only if <A>obj</A> is unchanged (as a &GAP; object) by this operation.
## The &OpenMath; standard does not stipulate that converting to and from
## &OpenMath; should be the identity function so this is a useful
## diagnostic tool.
## <Example>
## <![CDATA[
## gap> OMTestXML([[1..10],[1/2,2+E(4)],ZmodnZObj(2,6),(1,2),true,"string"]);
## true
## ]]>
## </Example>
## <Ref Func="OMTest"/> is a synonym to <Ref Func="OMTestXML"/>
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction("OMTestXML");
DeclareSynonym( "OMTest", OMTestXML );
#######################################################################
##
#F OMTestBinary( <obj> )
##
## Similar to OMTestXML, but uses binary OpenMath representation.
##
## <#GAPDoc Label="OMTestBinary">
## <ManSection>
## <Func Name="OMTestBinary" Arg="obj" />
## <Description>
## Converts <A>obj</A> to binary &OpenMath; and back. Returns true if and
## only if <A>obj</A> is unchanged (as a &GAP; object) by this operation.
## The &OpenMath; standard does not stipulate that converting to and from
## &OpenMath; should be the identity function so this is a useful
## diagnostic tool.
## <Example>
## <![CDATA[
## gap> OMTestBinary([[1..10],[1/2,2+E(4)],ZmodnZObj(2,6),(1,2),true,"string"]);
## true
## ]]>
## </Example>
## </Description>
## </ManSection>
## <#/GAPDoc>
DeclareGlobalFunction("OMTestBinary");
#############################################################################
#E
|