Next Previous Contents

# S-Lang Run-Time Library Reference: Version 2.0.4

## John E. Davis, `davis@space.mit.edu`

Jun 18, 2005

## 1. Data Types

- 1.1 Assoc_Type
- 1.2 List_Type
- 1.3 Struct_Type

## 2. Array Functions

- 2.1 all
- 2.2 any
- 2.3 array_info
- 2.4 array_map
- 2.5 array_reverse
- 2.6 array_shape
- 2.7 array_sort
- 2.8 array_swap
- 2.9 cumsum
- 2.10 init_char_array
- 2.11 _isnull
- 2.12 length
- 2.13 max
- 2.14 min
- 2.15 _reshape
- 2.16 reshape
- 2.17 sum
- 2.18 transpose
- 2.19 where

## 3. Associative Array Functions

- 3.1 assoc_delete_key
- 3.2 assoc_get_keys
- 3.3 assoc_get_values
- 3.4 assoc_key_exists

## 4. Functions that Operate on Strings

- 4.1 create_delimited_string
- 4.2 extract_element
- 4.3 glob_to_regexp
- 4.4 is_list_element
- 4.5 is_substr
- 4.6 make_printable_string
- 4.7 Sprintf
- 4.8 sprintf
- 4.9 sscanf
- 4.10 strbytelen
- 4.11 strbytesub
- 4.12 strcat
- 4.13 strcharlen
- 4.14 strchop
- 4.15 strchopr
- 4.16 strcmp
- 4.17 strcompress
- 4.18 string_match
- 4.19 string_match_nth
- 4.20 strjoin
- 4.21 strlen
- 4.22 strlow
- 4.23 strnbytecmp
- 4.24 strncharcmp
- 4.25 strncmp
- 4.26 strreplace
- 4.27 strsub
- 4.28 strtok
- 4.29 strtrans
- 4.30 strtrim
- 4.31 strtrim_beg
- 4.32 strtrim_end
- 4.33 strup
- 4.34 str_delete_chars
- 4.35 str_quote_string
- 4.36 str_replace
- 4.37 str_uncomment_string
- 4.38 substr
- 4.39 substrbytes

## 5. Functions that Operate on Binary Strings

- 5.1 array_to_bstring
- 5.2 bstring_to_array
- 5.3 bstrlen
- 5.4 pack
- 5.5 pad_pack_format
- 5.6 sizeof_pack
- 5.7 unpack

## 6. Functions that Manipulate Structures

- 6.1 __add_binary
- 6.2 __add_string
- 6.3 __add_unary
- 6.4 get_struct_field
- 6.5 get_struct_field_names
- 6.6 is_struct_type
- 6.7 _push_struct_field_values
- 6.8 set_struct_field
- 6.9 set_struct_fields

## 7. Functions that Create and Manipulate Lists

- 7.1 list_append
- 7.2 list_delete
- 7.3 list_insert
- 7.4 list_new
- 7.5 list_pop
- 7.6 list_reverse

## 8. Informational Functions

- 8.1 add_doc_file
- 8.2 _apropos
- 8.3 _function_name
- 8.4 __get_defined_symbols
- 8.5 get_doc_files
- 8.6 get_doc_string_from_file
- 8.7 _get_namespaces
- 8.8 is_defined
- 8.9 __is_initialized
- 8.10 _NARGS
- 8.11 set_doc_files
- 8.12 _slang_doc_dir
- 8.13 _slang_version
- 8.14 _slang_version_string

## 9. Mathematical Functions

- 9.1 abs
- 9.2 acos
- 9.3 acosh
- 9.4 asin
- 9.5 asinh
- 9.6 atan
- 9.7 atan2
- 9.8 atanh
- 9.9 ceil
- 9.10 Conj
- 9.11 cos
- 9.12 cosh
- 9.13 _diff
- 9.14 exp
- 9.15 floor
- 9.16 hypot
- 9.17 Imag
- 9.18 isinf
- 9.19 isnan
- 9.20 log
- 9.21 log10
- 9.22 _max
- 9.23 _min
- 9.24 mul2
- 9.25 polynom
- 9.26 Real
- 9.27 round
- 9.28 set_float_format
- 9.29 sign
- 9.30 sin
- 9.31 sinh
- 9.32 sqr
- 9.33 sqrt
- 9.34 tan
- 9.35 tanh

## 10. Message and Error Functions

- 10.1 errno
- 10.2 errno_string
- 10.3 error
- 10.4 message
- 10.5 new_exception
- 10.6 usage
- 10.7 verror
- 10.8 vmessage

## 11. Time and Date Functions

- 11.1 ctime
- 11.2 gmtime
- 11.3 localtime
- 11.4 mktime
- 11.5 _tic
- 11.6 tic
- 11.7 _time
- 11.8 time
- 11.9 times
- 11.10 _toc
- 11.11 toc

## 12. Data-Type Conversion Functions

- 12.1 atof
- 12.2 atoi
- 12.3 atol
- 12.4 atoll
- 12.5 char
- 12.6 define_case
- 12.7 double
- 12.8 int
- 12.9 integer
- 12.10 isdigit
- 12.11 _slang_guess_type
- 12.12 string
- 12.13 tolower
- 12.14 toupper
- 12.15 typecast
- 12.16 _typeof
- 12.17 typeof

## 13. Stdio File I/O Functions

- 13.1 clearerr
- 13.2 fclose
- 13.3 fdopen
- 13.4 feof
- 13.5 ferror
- 13.6 fflush
- 13.7 fgets
- 13.8 fgetslines
- 13.9 fopen
- 13.10 fprintf
- 13.11 fputs
- 13.12 fputslines
- 13.13 fread
- 13.14 fread_bytes
- 13.15 fseek
- 13.16 ftell
- 13.17 fwrite
- 13.18 pclose
- 13.19 popen
- 13.20 printf

## 14. Low-level POSIX I/O functions

- 14.1 close
- 14.2 dup_fd
- 14.3 fileno
- 14.4 isatty
- 14.5 lseek
- 14.6 open
- 14.7 read
- 14.8 write

## 15. Directory Functions

- 15.1 chdir
- 15.2 chmod
- 15.3 chown
- 15.4 getcwd
- 15.5 listdir
- 15.6 lstat_file
- 15.7 mkdir
- 15.8 readlink
- 15.9 remove
- 15.10 rename
- 15.11 rmdir
- 15.12 stat_file
- 15.13 stat_is
- 15.14 symlink

## 16. Functions that Parse Filenames

- 16.1 path_basename
- 16.2 path_basename_sans_extname
- 16.3 path_concat
- 16.4 path_dirname
- 16.5 path_extname
- 16.6 path_get_delimiter
- 16.7 path_is_absolute
- 16.8 path_sans_extname

## 17. System Call Functions

- 17.1 getegid
- 17.2 geteuid
- 17.3 getgid
- 17.4 getpid
- 17.5 getppid
- 17.6 getuid
- 17.7 kill
- 17.8 mkfifo
- 17.9 setgid
- 17.10 setpgid
- 17.11 setuid
- 17.12 sleep
- 17.13 system
- 17.14 umask
- 17.15 uname

## 18. Eval Functions

- 18.1 autoload
- 18.2 byte_compile_file
- 18.3 eval
- 18.4 evalfile
- 18.5 get_slang_load_path
- 18.6 set_slang_load_path

## 19. Module Functions

- 19.1 get_import_module_path
- 19.2 import
- 19.3 set_import_module_path

## 20. Debugging Functions

- 20.1 _boseos_info
- 20.2 _clear_error
- 20.3 _debug_info
- 20.4 _set_bos_handler
- 20.5 _set_eos_handler
- 20.6 _slangtrace
- 20.7 _traceback
- 20.8 _trace_function

## 21. Stack Functions

- 21.1 dup
- 21.2 exch
- 21.3 pop
- 21.4 __pop_args
- 21.5 _pop_n
- 21.6 _print_stack
- 21.7 __push_args
- 21.8 _stkdepth
- 21.9 _stk_reverse
- 21.10 _stk_roll

## 22. Miscellaneous Functions

- 22.1 _auto_declare
- 22.2 __class_id
- 22.3 __class_type
- 22.4 current_namespace
- 22.5 _eqs
- 22.6 getenv
- 22.7 __get_reference
- 22.8 implements
- 22.9 __is_callable
- 22.10 __is_numeric
- 22.11 __is_same
- 22.12 putenv
- 22.13 _slang_install_prefix
- 22.14 _slang_utf8_ok
- 22.15 __uninitialize
- 22.16 use_namespace

Next Previous Contents