home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / SYMBMATH.H08 < prev    next >
Text File  |  1993-11-07  |  2KB  |  40 lines

  1.                 3.1.8  Arrays and Array Index
  2.         Arrays are the same as arrays in such language as PASCAL and
  3. FORTRAN. But you can use arrays without declaring arrays, unlike in PASCAL
  4. and FORTRAN.
  5.         e.g.
  6. a[1]:=1
  7. a[2]:=4
  8.  
  9.     The array index is the index for n-th element in an array. e.g.
  10. a[2] indicates the second element in the array a.
  11.  
  12.         3.1.9  Lists and List Index
  13.         Lists are similar to lists in such language as PROLOG.
  14.     [a, b, c] is a list.
  15.         [a, b, [c1, c2]] is a list of lists.
  16.     The list index is the index for n-th element in a list. e.g.
  17. b[2] indicates the second element in the list b.
  18.     The built-in list index is last[number]. The name of last
  19. output list is last, e.g. last[1] is the first element in the
  20. last output list.
  21.  
  22.                 3.1.10  Strings
  23.     A string is a sequence of characters between two quotation marks.
  24. e.g. "1234567890". Note that 1234 is number but "1234" is string. The
  25. number can be calculated and only has 11 of max digits, while string
  26. cannot be calculated and has 64000 of max characters long.
  27.         Strings can be storeed in variables, concatenated, removed,
  28. lengthed, and converted to numbers if possible.
  29.         e.g. 
  30. IN:  p := "abc"                  # "abc" is stored in variable p
  31. OUT: p := "abc"
  32. IN:  concat("s","t")             # concatenate "s" and "t"
  33. OUT: st
  34. IN:  remove("b" from "ab")       # remove "b" from "ab"
  35. OUT: "a"
  36. IN:  length("abc")               # count length of "abc"
  37. OUT: 3
  38. IN:  number("123")               # convert string "123" into number 123
  39. OUT: 123       
  40.