OCaml
OCaml | |||
---|---|---|---|
Tilblivelse | 1996 | ||
Paradigme | Multi-paradigme: Funksjonell programmering, imperativ programmering, objektorientert programmering, modulær programmering | ||
Designet av | Xavier Leroy, Damien Doligez | ||
Utviklet av | INRIA | ||
Siste versjon(er) | 5.2.0 / 13. mai 2024 | ||
Typetildeling | inferens, statisk, sterk, strukturell | ||
Filendelse(r) | .ml, .mli | ||
OS | Unix-liknende | ||
Lisens | Q Public License, LGPL 2.1 | ||
Implementert i | |||
Objective Caml, C | |||
Påvirket av | |||
Standard ML |
OCaml, eller Objective Caml, er «storebroren» til Caml og tilbyr i tillegg til Caml-egenskapene mulighet for objektorientert programmering.
Hello World
ocaml -I +labltk Objective Caml version 3.09.1 # print_endline "Hello world";; Hello world - : unit = () # let f = print_endline;; val f : string -> unit = <fun> # let g x y = x^" "^y;; val g : string -> string -> string = <fun> # let h = g "Hello";; val h : string -> string = <fun> # h "world";; - : string = "Hello world" # h "kévin";; - : string = "Hello kévin" # let (&) f g x = g (f x) ;; val ( & ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c = <fun> # ( h & f ) "world";; Hello world - : unit = () #load "labltk.cma";; #open Tk;; # let _ = let top = openTk () in let button = Button.create ~background:`White ~text:"Hello" top in bind ~events:[`ButtonPress;`KeyPressDetail "Return"] ~action:(fun _ -> print_endline "Hello World") top; pack [coe button]; mainLoop() ;; - : unit = () #
Eksterne lenker
- (en) Offisielt nettsted
- (en) OCaml – kategori av bilder, video eller lyd på Commons
- v
- d
- r
A# · ActionScript · Ada · Alef · ALGOL · ALGOL 58 · ALGOL 60 · ALGOL 68 · ALTRAN · APL · AppleScript · Argus · Assembler · Autokode · awk · B · BASIC · BCPL · BETA · BitC · BLISS · Bourne Shell · C · C++ · C-- · CHILL · C# · C shell · Caml · Ch · Cilk · Cilk++ · Cilk Plus · Clarion · Clipper · CLISP · Clojure · CLU · COBOL · COMAL · Common Lisp · Concurrent C · Concurrent Euclid · Concurrent Pascal · C shell · D · Delphi · Dylan · ECMAScript · Eiffel · Emacs Lisp · Erlang · Euclid · F* · F# · Forth · Fortran · GNU Common Lisp · GNU Pascal · Go · Haskell · HyperTalk · Incr Tcl · INTERCAL · Interlisp · Java · JavaScript · JRuby · LaTeX · Legoscript · LilyPond · Limbo · Lisp · LPC · Lua · Lynx · Mary · MATLAB · Mesa · ML · MML · Modula · Modula-2 · Modula-2+ · MUMPS · Objective-C · Objective-C++ · OCaml · OpenVera · O'Haskell · Pascal · Perl · PHP · Pike · PL/I · Plankalkül · PLEX · Prolog · Protel · Pure Data · Python · R · Ratfor · REXX · RTL/2 · Ruby · Rust · SAS · Scala · Scheme · Scratch · Simula · SML · Smalltalk · SNOBOL · Tcsh · Tcl · TECO · TOM · Turbo Basic · Turbo Pascal · Verilog · Visual Prolog · Turing · TypeScript · Vala · VHDL · Visual Basic
- Liste over programmeringsspråk
- Kategori
Denne artikkelen er en spire. Du kan hjelpe Wikipedia ved å utvide den.