next up previous
Next: GP lists Up: Common problems Previous: Memory handling and global


Member functions

Member functions (for example nf.disc) are supported only when there is no ambiguity on the type of the argument. For a variable the syntax is v:type inside a declaration, where v is the variable name and type is the type, for example, write local(K:nf); to declare K as a number field.

Expressions can also be typed (i.e., typecasted). The precise use of typing is outside the use of this tutorial, but in the context of member functions we note the most useful types:

nf
for ordinary number fields, i.e., a result given by the GP function nfinit.
bnf
for big number fields, i.e., a result given by the GP function bnfinit which includes class and unit group data.
bnr
for ray class groups, i.e., a result given by the GP function bnrinit.
ell
for elliptic curves, i.e., a result given by the GP function ellinit.
gal
for galois extensions, i.e., a result given by the GP function galoisinit.
prid
for prime ideals, i.e., a component of the result given by the GP function idealprimedec.


next up previous
Next: GP lists Up: Common problems Previous: Memory handling and global
Bill Allombert 2003-11-03