Loading ...
Sorry, an error occurred while loading the content.
 

Graphics error message

Expand Messages
  • billspight
    Hi! Using OCamlWin I tried entering the following from the Chailloux, Manoury, Pagano book, and got these responses. # let from_rgb (c : Graphics.color) = let
    Message 1 of 1 , Apr 3, 2003
      Hi!

      Using OCamlWin I tried entering the following from the Chailloux,
      Manoury, Pagano book, and got these responses.

      # let from_rgb (c : Graphics.color) =
      let r = c / 65536 and g = c / 256 mod 256 and b = c mod 256
      in (r,g,b);;
      val from_rgb : Graphics.color -> int * int * int = <fun>
      # let inv_color (c : Graphics.color) =
      let (r,g,b) = from_rgb c
      in Graphics.rgb (255-r) (255-g) (255-b);;
      Reference to undefined global `Graphics'

      What is going on?

      (I set the correct environmental variables for OCAML lib and PATH.)

      Many thanks,

      Bill
    Your message has been successfully submitted and would be delivered to recipients shortly.