home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / FUNCTION.SM < prev    next >
Text File  |  1993-11-14  |  162b  |  11 lines

  1. #    This is demo of defining function.
  2. #    simple and special first. e.g. f(0) first.
  3.  
  4. f(0) := 0
  5. f(x_) := if(x>0, x)
  6. f(t_) := if(t<0, -t)
  7.  
  8. f(2)
  9. f(-2)
  10. f(b)
  11.