Some functions accept optional arguments. Each of these optional arguments has a name. For example, one of the optional arguments for gb is named DegreeLimit; it can be used to specify that the computation should stop after a certain degree has been reached. Values for optional arguments are specified by providing additional arguments of the form B=>v where B is the name of the optional argument, and v is the value provided for it.
i1 : R = ZZ/101[x,y,z,w]; |
i2 : gb ideal(x*y-z^2,y^2-w^2) |
i3 : gb(ideal(x*y-z^2,y^2-w^2),DegreeLimit => 2) |
The names and default values of the optional arguments for a function can be obtained with options, as follows.
i4 : o = options res |
The value returned is a type of hash table, and can be used to obtain particular default values.
i5 : o.SortStrategy |
The entry DegreeLimit => 2 is called an option. Internally it is represented as a type of list of length 2.
i6 : DegreeLimit => 2 |
i7 : peek oo |