Vincent Balat

Programmation comparée

Inscrivez-vous à la liste de diffusion.

Projet 2

23/02/2010 Nouvelle version du sujet

Exercices

  • Typage du XHTML
    Erratum: Le type 'a node est défini par
type 'a node = 
 | Node of (string * attributs * node list)
 | Text of string
  • Threads
open Graphics;;
open_graph " 1000x1000";;
fill_circle 12 12 10;;
let i = get_image 0 0 24 24;;

let rec f x0 y0 r alpha =
  draw_image i (x0 + truncate (r *. (cos alpha)))
    (y0 + truncate (r *. (sin alpha)));
  f x0 y0 r (alpha +. 0.0001);;

Thread.create (f 500 550 100.) 0.;;
Thread.create (f 500 500 100.) 0.;;

let _ = read_line ();;