Top
Back: package
Forward: package related functions
FastBack: number
FastForward: poly
Up: package
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.15.1 package declarations

Syntax:
package name ;

Purpose:
defines a package (Only relevant in very special situations).

Example:
 
  package Test;
  int i=3; exportto(Test,i);
  Test::i+2;
==> 5
  i;
==>    ? `i` is undefined
==>    ? error occurred in or before ./examples/package_declarations.sing lin\
   e 4: `  i;`
  listvar();
  listvar(Test);
==> // Test                           [0]  package Test (N)
==> // ::i                            [0]  int 3
  package dummy = Test;
  kill Test;
  listvar(dummy);
==> // dummy                          [0]  package dummy (N)
==> // ::i                            [0]  int 3


Top Back: package Forward: package related functions FastBack: number FastForward: poly Up: package 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.