CS537 - Lecture Notes for 2000.03.22

By Christopher Cunningham



SML Basic Types

Type Example Operators
Unit ()
Bool true, false andalso, orelse, =, <>
Integers 75, ~10 basic math ops (+, -, *, div, mod) and relational ops (<, <=, >, >=, =, <>)
Strings "xyz" std. escape chars, relational ops
Reals 3.14, 21e7 real(conversion), basic math ops, relational ops except for = and <>, floor, ceiling
Char #"a" str(#"a") (conversion)


Type Constructors

Identifiers (two types)

Creating New Identifiers

Introduction to Functions