fieker-DuValspielwiese
Last change
on this file since 94fcf4 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
|
Rev | Line | |
---|
[c3c00f] | 1 | version="0.0.0"; |
---|
[33a3fda] | 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 | } |
---|
[c3c00f] | 20 | |
---|
[33a3fda] | 21 | // |
---|
| 22 | // Example of a static procedure |
---|
| 23 | // |
---|
| 24 | static proc internal_tab(int n) |
---|
| 25 | { return(" "[1,n]); } |
---|
Note: See
TracBrowser
for help on using the repository browser.