source: doc/theses/jiada_liang_MMath/test1.ml @ b12e4ad

Last change on this file since b12e4ad was 1725989, checked in by Peter A. Buhr <pabuhr@…>, 5 months ago

add enumeration test programs for different programming languages

  • Property mode set to 100644
File size: 482 bytes
RevLine 
[1725989]1type character_class =
2    Barbarian
3  | Bard
4  | Cleric
5  | Druid
6  | Fighter
7  | Monk
8  | Paladin
9  | Ranger
10  | Rogue
11  | Sorcerer
12  | Wizard
13
14type rectitude = Evil | R_Neutral | Good
15
16type firmness = Chaotic | F_Neutral | Lawful
17
18let rectitude_to_french = function
19    | Evil -> "Mauvais"
20    | R_Neutral -> "Neutre"
21    | Good -> "Bon"
22
23let X : string = rectitude_to_french( Evil );
24
25(* Local Variables: *)
26(* tab-width: 4 *)
27(* compile-command: "ocaml test1.ml" *)
28(* End: *)
Note: See TracBrowser for help on using the repository browser.