spielwiese
Last change
on this file since 33a3fda was
33a3fda,
checked in by Anne Frühbis-Krüger <anne@…>, 25 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
|
Rev | Line | |
---|
[33a3fda] | 1 | |
---|
| 2 | info="LIBRARY: sample.lib |
---|
| 3 | |
---|
| 4 | sample library for static and global procedures |
---|
| 5 | "; |
---|
| 6 | // |
---|
| 7 | // Example of a user accessible procedure |
---|
| 8 | // |
---|
| 9 | proc tab (int n) |
---|
| 10 | "USAGE: tab(n); (n integer) |
---|
| 11 | RETURNS: string of n space tabs |
---|
| 12 | EXAMPLE: example tab; shows an example |
---|
| 13 | { return(internal_tab(n)); } |
---|
| 14 | example |
---|
| 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 | // |
---|
| 23 | static proc internal_tab(int n) |
---|
| 24 | { return(" "[1,n]); } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.