source: git/doc/sample.lib @ 82716e

fieker-DuValspielwiese
Last change on this file since 82716e was 33a3fda, checked in by Anne Frühbis-Krüger <anne@…>, 26 years ago
*Anne: created sample.lib because it is no longer generated automatically git-svn-id: file:///usr/local/Singular/svn/trunk@1696 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 486 bytes
Line 
1
2info="LIBRARY: sample.lib
3
4      sample library for static and global procedures
5";
6//
7// Example of a user accessible procedure
8//
9proc tab (int n)
10"USAGE:    tab(n);  (n integer)
11RETURNS:  string of n space tabs
12EXAMPLE:  example tab; shows an example
13{ return(internal_tab(n)); }
14example
15{
16  "EXAMPLE:"; echo=2;
17  for(int n=0; n<=5; n=n+1)
18  { tab(5-n)+"*"+tab(n)+"+"+tab(n)+"*"; }
19}
20//
21// Example of a static procedure
22//
23static proc internal_tab(int n)
24{ return(" "[1,n]); }
25 
26
27
Note: See TracBrowser for help on using the repository browser.