1#% -*- mode: tm; mode: fold; -*- 2#%{{{Macros 3 4#i linuxdoc.tm 5#i local.tm 6 7#d function#1 \sect{<bf>$1</bf>\label{$1}}<descrip> 8#d variable#1 \sect{<bf>$1</bf>\label{$1}}<descrip> 9#d datatype#1 \sect{<bf>$1</bf>\label{$1}}<descrip> 10 11#s+ 12static define issubstr_function (str, sstr) 13{ 14 vinsert ("%d", is_substr(str, sstr)); 15} 16tm_add_macro ("issubstr", &issubstr_function, 2, 2); 17#s- 18 19#d synopsis#1 <tag> Synopsis </tag> $1 20#d keywords#1 <tag> Keywords </tag> $1 21#% avoid putting a tscreen env (generated by #v+...#v-) inside 22#% <tt></tt>, which the DTD does not permit. 23#d usage#1 <tag> Usage </tag> \ 24 \if{\issubstr{$1}{\__newline__}}{$1}{<tt>$1</tt>} 25 26#d description <tag> Description </tag> 27#d qualifiers <tag> Qualifiers </tag> 28#d methods <tag> Methods </tag> <tt></tt> 29#d method#2 <tag> $1 </tag> $2 30#d example <tag> Example </tag> 31#d notes <tag> Notes </tag> 32#d seealso#1 <tag> See Also </tag> <tt>$1</tt> 33#d r#1 \ref{$1}{$1} 34#d done </descrip><p> 35#d -1 <tt>-1</tt> 36#d 0 <tt>0</tt> 37#d 1 <tt>1</tt> 38#d 2 <tt>2</tt> 39#d 3 <tt>3</tt> 40#d 4 <tt>4</tt> 41#d 5 <tt>5</tt> 42#d 6 <tt>6</tt> 43#d 7 <tt>7</tt> 44#d 8 <tt>8</tt> 45#d 9 <tt>9</tt> 46#d NULL <tt>NULL</tt> 47#d documentstyle book 48 49#%}}} 50 51\linuxdoc 52\begin{\documentstyle} 53 54\title SLSH Library Reference (version 2.3.0) 55\author John E. Davis <www.jedsoft.org> 56\date \__today__ 57 58\toc 59 60\chapter{Introduction} 61 62#d doc_root_url http://www.jedsoft.org/slang/doc 63#d ifun_doc_url \doc_root_url/html/slangfun.html 64 65This document describes both the \slsh intrinsic functions and the 66\slsh library functions. The latter functions are written in \slang 67and make use of lower-level intrinsic functions that are described in 68the \href{\ifun_doc_url}{Intrinsic Function Reference Manual}. 69As the \slsh library functions make no use of \slsh intrinsics, they 70may be used by any conforming \slang application. The \slsh intrinsic 71functions are specific to \slsh. 72 73Before a particular \slsh library function may be used, the file that 74defines the function must first be loaded. The recommended mechanism 75for loading a file is through the use of the 76\sfun{require} function, e.g., 77#v+ 78 require ("structfuns"); 79#v- 80will make the functions defined in the file \file{structfuns.sl} 81available to the interpreter. The \sfun{require} function itself is 82defined in the file \file{require.sl}, which a conforming application 83will automatically load. 84 85\chapter{The \tt{require} Function} 86The functions in \file{require.sl} facilitate the loading of \slang 87code. 88#i ../../lib/tm/require.tm 89 90\chapter{Command Line Parsing Functions} 91These functions are defined in the \file{cmdopt.sl} file. 92#i ../../lib/tm/cmdopt.tm 93 94\chapter{Filename Globbing and Related Functions} 95The \sfun{glob} function is defined \file{glob.sl}. The 96\sfun{fswalk_new} may be used for more generic filesystem processing. 97It is defined in \file{fswalk.sl}. 98#i ../../lib/tm/glob.tm 99#i ../../lib/tm/fswalk.tm 100 101\chapter{Reading Text-formated Data Files} 102These functions are defined in \file{readascii.sl}. For comma or 103tab-delimited files, consider useing the CSV module. 104#i ../../lib/tm/readascii.tm 105 106\chapter{Structure Functions} 107These functions are defined in \file{structfuns.sl}. 108#i ../../lib/tm/structfuns.tm 109 110\chapter{Array Functions} 111\slang includes many intrinsic functions that operate on arrays. The 112additional functions described here are defined in 113\file{arrayfuns.sl}. 114 115#i ../../lib/tm/arrayfuns.tm 116 117\chapter{List Functions and List-based Data Structures} 118The file \file{arrayfuns.sl} includes functions for manipulating 119lists. It also includes some list-based data structures such as heaps. 120#i ../../lib/tm/listfuns.tm 121 122\chapter{Subprocess Functions} 123These functions in \file{process.sl} facilitate the creation of 124subprocesses and pipelines. 125#i ../../lib/tm/process.tm 126 127\chapter{Profiling Functions} 128These functions are used by \bf{slprof} for profiling \slsh 129applications. 130#i ../../lib/tm/profile.tm 131 132\chapter{Set Functions} 133These functions manipulate arrays and lists as sets. 134#i ../../lib/tm/setfuns.tm 135 136\chapter{Miscellaneous Functions} 137#i ../../lib/tm/print.tm 138 139\chapter{SLSH intrinsic functions} 140#i slshifun.tm 141 142\end{\documentstyle} 143