Top
Back: ncVarsAdd
Forward: ncratAdd
FastBack:
FastForward:
Up: ncrat_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

7.10.6.4 ncratDefine

Procedure from library ncrat.lib (see ncrat_lib).

Usage:
ncrat f = ncratDefine(s, l);
string s contains kind, list l contains expressions

Return:
ncrat with kind s and expressions l

Note:
assignment operator '=' for ncrat is overloaded
with this procedure, hence
ncrat f = s, l;
yields the same result as
ncrat f = ncratDefine(s, l);

Example:
 
LIB "ncrat.lib";
ncInit(list("x", "y", "z"));
number n = 5;
ncrat f = ncratDefine("Const", list(n));
typeof(f);
==> ncrat
f.kind;
==> Const
f.expr;
==> [1]:
==> 5
f;
==> 5
==> 
ncrat g = "Const", list(n);
g;
==> 5
==> 


Top Back: ncVarsAdd Forward: ncratAdd FastBack: FastForward: Up: ncrat_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.