Created
October 23, 2012 17:09
-
-
Save philtomson/3940124 to your computer and use it in GitHub Desktop.
Using Graphics module in Ocaml toplevel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* SEE: http://mirror.ocamlcore.org/wiki.cocan.org/tips_for_using_the_ocaml_toplevel.html *) | |
$ ocaml | |
# #use "topfind" ;; | |
Findlib has been successfully loaded. Additional directives: | |
#require "package";; to load a package | |
#list;; to list the available packages | |
#camlp4o;; to load camlp4 (standard syntax) | |
#camlp4r;; to load camlp4 (revised syntax) | |
#predicates "p,q,...";; to set these predicates | |
Topfind.reset();; to force that packages will be reloaded | |
#thread;; to enable threads | |
- : unit = () | |
# #list ;; (* list available packages *) | |
# #require "graphics" ;; | |
# open Graphics ;; | |
# open_graph " 640x480";; | |
# draw_circle 250 250 20; draw_circle 350 250 20; draw_circle 300 200 120; draw_arc 300 200 60 60 180 360; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment