caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: CHARDON Bertrand <moomba@wanadoo.fr>
To: caml-list@inria.fr
Subject: [Caml-list] compilation ocaml sous linux
Date: Tue, 12 Jun 2001 16:37:48 -0400	[thread overview]
Message-ID: <3B267D9C.6DA11731@wanadoo.fr> (raw)

Je me doute qu'on va me trouver assez novice mais bon...le jeu de la
question vaut sans la doute la chandelle de quelques ricanements :)

J'ai fait le choix il ya desormais deux semaines de tourner le dos 
a windows pour embrasser une distribution linux mandrake 8...
Je me mets à coder un truc assez banal en ocaml sous un éditeur
quelconque ...(en réalité peut on vraiment dire que xemacs est un
éditeur quelconque ;-) ???). Là j'ouvre un terminal je tape ocamlc 
retourne.ml , suivi d'un ls.
Là je vois que j'ai trois nouveaux fichiers retourne.cmi (??)
retourne.cmo (??) et a.out. J'ai déjà fait du c sous linux à la fac
d'orsay donc je me dis que je vais exécuter a.out. Là l'interpréteur de
commandes bash me renvoie à mes études (ce en quoi il n'a peut être pas
tort, un rude TP de compilation m'attendant à la rentrée scolaire....)
en m'indiquant que la commande a.out n'existe pas...Je tape donc ./aout
comme indiqué dans le manuel utilisateur que j'ai pris soin de
consulter...
Là il semble qu'aucun problème ne surgisse mais rien ne s'affiche à
l'écran alors même qu'un affichage aurait dû se produire (utilisation de
print_string..). Incompréhension de ma part.

Je laisse mon code à la suite si jamais c'est une bêtise  j'aimerais en
connaitre la teneur....merci 
 /**************** Code ***************/
let rec retourne_aux l1 l2=match l1 with 
	[]->l2
	|h::t -> retourne_aux t (h::l2);;
 
let retourne l=retourne_aux l [];;

let liste=[10;15;1;4;7;8;9];;

let miroir_liste=retourne liste;;

let rec list_to_string l= match l with 
	[]->""
	|h::d->let p=string_of_int h in 
			(p^" "^list_to_string d);;

let affiche_liste l=print_string("["^list_to_string l);;

affiche_liste miroir_liste;;

/********************************************************/
PS : Je ne connais pas le fonctionnement d'une mailing list...si jamais
j'étais ou avais été amené à en faire un usage inapproprié veuillez me
le signaler sur le champ.

Un utilisteur ravi de Ocaml.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-06-12 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-12 20:37 CHARDON Bertrand [this message]
2001-06-12 15:13 ` Maxence Guesdon
  -- strict thread matches above, loose matches on Subject: below --
2001-06-12 18:04 Damien Doligez
2001-06-13 13:22 ` Sven LUTHER

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B267D9C.6DA11731@wanadoo.fr \
    --to=moomba@wanadoo.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).