source: git/doc/sample.lib @ 7a9a32

spielwiese
Last change on this file since 7a9a32 was c3c00f, checked in by Jens Schmidt <schmidt@…>, 26 years ago
* sample.lib (info): version string added git-svn-id: file:///usr/local/Singular/svn/trunk@1939 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 498 bytes
Line 
1version="0.0.0";
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//
22// Example of a static procedure
23//
24static proc internal_tab(int n)
25{ return(" "[1,n]); }
Note: See TracBrowser for help on using the repository browser.