source: git/doc/sample.lib @ e3663f1

spielwiese
Last change on this file since e3663f1 was 776986, checked in by Olaf Bachmann <obachman@…>, 25 years ago
* first batch of GMG's remarks git-svn-id: file:///usr/local/Singular/svn/trunk@3212 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 387 bytes
Line 
1// Example of a user accessible procedure
2proc tab (int n)
3"USAGE:    tab(n);  (n integer)
4RETURNS:  string of n space tabs
5EXAMPLE:  example tab; shows an example
6"
7{ return(internal_tab(n)); }
8example
9{
10  "EXAMPLE:"; echo=2;
11  for(int n=0; n<=4; n=n+1)
12  { tab(4-n)+"*"+tab(n)+"+"+tab(n)+"*"; }
13}
14
15// Example of a static procedure
16static proc internal_tab(int n)
17{ return(" "[1,n]); }
Note: See TracBrowser for help on using the repository browser.