Top
Back: 5.1.25 example
Forward: 5.1.27 exit
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.26 execute

Syntax:

execute ( string_expression )

Type:

none

Purpose:

executes a string containing a sequence of SINGULAR commands.

Note:

The command return cannot appear in the string.
execute should be avoided in procedures whenever possible, since it may give rise to name conflicts. Moreover, such procedures cannot be precompiled (a feature which SINGULAR will provide in the future).

Example:
 
  ring r=32003,(x,y,z),dp;
  ideal i=x+y,z3+22y;
  write(":w save_i",i);
  ring r0=0,(x,y,z),Dp;
  string s="ideal k="+read("save_i")+";";
  s;
→ ideal k=x+y,z3+22y
→ ;
  execute(s); // define the ideal k
  k;
→ k[1]=x+y
→ k[2]=z3+22y

Top Back: 5.1.25 example Forward: 5.1.27 exit FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.