« Premiers pas en OCaml/Fonctions utilitaires » : différence entre les versions

Contenu supprimé Contenu ajouté
Watermy (discussion | contributions)
+ajout infos manquantes
Watermy (discussion | contributions)
+ Tableau récapitulatif
Ligne 251 :
Exception: Invalid_argument "index out of bounds".
</source>
 
== Tableau récapitulatif ==
 
{| align="center" class="wikitable"
! Nom !! Fonction !! Type
|-
| rowspan="11" | Conversion
| int_of_float || <source lang="ocaml">float -> int</source>
|-
| float_of_int || <source lang="ocaml">int -> float</source>
|-
| (float) || <source lang="ocaml">int -> float</source>
|-
| int_of_char || <source lang="ocaml">char -> int</source>
|-
| char_of_int || <source lang="ocaml">int -> char</source>
|-
| string_of_bool || <source lang="ocaml">bool -> string</source>
|-
| bool_of_string || <source lang="ocaml">string -> bool</source>
|-
| int_of_string || <source lang="ocaml">string -> int</source>
|-
| string_of_int || <source lang="ocaml">int -> string</source>
|-
| float_of_string || <source lang="ocaml">string -> float</source>
|-
| string_of_float|| <source lang="ocaml">float -> string</source>
|-
| rowspan="3" | Lecture
| read_line || <source lang="ocaml">unit -> string</source>
|-
| read_int || <source lang="ocaml">unit -> int</source>
|-
| read_float || <source lang="ocaml">unit -> float</source>
|-
| rowspan="6" | Affichage
| print_char || <source lang="ocaml">char -> unit</source>
|-
| print_int || <source lang="ocaml">int -> unit</source>
|-
| print_float || <source lang="ocaml">float -> unit</source>
|-
| print_string || <source lang="ocaml">string -> unit</source>
|-
| print_endline || <source lang="ocaml">string -> unit</source>
|-
| print_newline|| <source lang="ocaml">unit -> unit</source>
|-
| Concaténation || ^ || <source lang="ocaml">string -> string -> string</source>
|-
| Argument || Sys.argv.() || <source lang="ocaml">string</source>
|}
 
== Référence ==
Toutes ces informations sont disponibles sur la documentation officielle :
* {{lienWeb|format=html|licence=copyright|langue=fr|url=http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html | commentaire=Liste des fonctions }}
 
[[Catégorie:Premiers pas en OCaml]]