File: sample.lib

package info (click to toggle)
singular 1%3A4.4.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 47,520 kB
  • sloc: cpp: 319,164; ansic: 42,206; perl: 5,855; sh: 5,524; lisp: 4,241; python: 2,101; makefile: 1,890; yacc: 1,651; pascal: 1,411; lex: 1,367; tcl: 1,024; xml: 182
file content (16 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Example of a user accessible procedure
proc tab (int n)
"USAGE:    tab(n);  n integer
RETURNS:  string of n space tabs
EXAMPLE:  example tab; shows an example"
{ return(internal_tab(n)); }
example
{
  "EXAMPLE:"; echo=2;
  for(int n=0; n<=4; n=n+1)
  { tab(4-n)+"*"+tab(n)+"+"+tab(n)+"*"; }
}

// Example of a static procedure
static proc internal_tab (int n)
{ return(" "[1,n]); }