Equivalent

home1 home2
 Bib
 Algorithms
 Bioinfo
 FP
 Logic
 MML
 Prog.Lang
and the
 Book

Prog.Lang
 Glossary
  Block str.
  Equiv

SML

The SML equivalent of the imperative block-structured [example]:

let                   --lex level 1
  val v1=...;            --level 1 obj 1
  val v2=...;            --level 1 obj 2

  fun A() =              --level 1 obj 3
    
let               --lex level 2
  val v3=...;        --level 2 obj 1

  fun B() =          --level 2 obj 2
    
let            --lex level 3
  val v4=...;     --level 3 obj 1
in ...
end{B}
in B() --call B end{A};
fun C() = --level 1 obj 4
    
let               --lex level 2
  val v5=...;        --level 2 obj 1

  fun D() =          --level 2 obj 2
    
let            --lex level 3
  val v6=...;     --level 3 obj 1
in A()         --call A
end{D}
in D() --call D end{C}
in C() --call C end
-- LA, CS UWA
Coding Ockham's Razor, L. Allison, Springer

A Practical Introduction to Denotational Semantics, L. Allison, CUP

Linux
 Ubuntu
free op. sys.
OpenOffice
free office suite
The GIMP
~ free photoshop
Firefox
web browser

© L. Allison   http://www.allisons.org/ll/   (or as otherwise indicated),
Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University,
was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.)
Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Friday, 19-Apr-2024 05:28:58 AEST.