caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benjamin Quetier <Benjamin.Quetier@lri.fr>
To: caml-list@inria.fr
Subject: [Caml-list] variables communes
Date: Fri, 26 Mar 2004 17:16:02 +0100	[thread overview]
Message-ID: <40645742.5010707@lri.fr> (raw)

Bonjour

je vous explique mon probleme. J'ai un programme avec cette définition 
de variable :

let my_env = ref 1


puis  en dessous

establish_server new_connection (ADDR_INET (ip,port))

qui me lance un serveur et à chaque connexion lance un nouveau 
processus  avec la fonction new_connection en lui passant en argument le 
channel_in et le channel_out)


maintenant, dans la fonction new_connection , je fais des :

my_env := (!my_env)+1


Mon problème est qu'en sortant de la fonction new_connection, la 
variable my_env du processus de base n'a pas été modifiée.

Comment faut-il faire?

merci d'avance

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2004-03-26 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-26 16:16 Benjamin Quetier [this message]
2004-03-26 15:31 ` Richard Jones

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=40645742.5010707@lri.fr \
    --to=benjamin.quetier@lri.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).