Top
Back: example
Forward: exit
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: 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: example Forward: exit FastBack: Functions and system variables FastForward: Control structures Up: Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 2-0-4, May 2003, generated by texi2html.