markus endres on 24 Jun 2003 16:43:27 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

structure and type


hallo together,

I'm going to write a function called ModuleInit which initalizes a
Module in a group ring and some information for further computing with
modules. 

well, this funtion ModuleInit should return a five-component vector like
[ module in HNF, module denominator, module inverse, dual module, ... ].

now, I want to call another function, for example a function called
ModuleSection, which computes the section of two moduli, with two moduli
as arguments. 

and in the routine ModuleSection I first want to check, if the moduli
were initialized by ModuleInit, like the check is performed for example
in some number field functions which returns ***please apply nfinit
first***. 

so, how is it possible to check if a module is given by a 5-component
vector?

of course, I can write something like

if(type(module) == "t_VEC"  && length(module) == 5 , ......


but I want something shorter like

if(type(module) == ModuleType, ...

where ModuleType represents the 5-component vector as above. 

is there any possibility?


thanks in advance

greetings

markus