From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA18278; Wed, 14 Feb 2001 08:30:32 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA18373 for ; Wed, 14 Feb 2001 08:30:31 +0100 (MET) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.10]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f1E7UUb01225 for ; Wed, 14 Feb 2001 08:30:31 +0100 (MET) Received: from zigzag.cs.huji.ac.il ([132.65.208.204] ident=root) by cs.huji.ac.il with esmtp (Exim 3.20 #1) id 14SwOP-0001rc-00; Wed, 14 Feb 2001 09:30:25 +0200 Received: (from orodeh@localhost) by zigzag.cs.huji.ac.il (8.9.3/1.1c) id JAA09532; Wed, 14 Feb 2001 09:30:25 +0200 Date: Wed, 14 Feb 2001 09:30:25 +0200 (IST) From: Ohad Rodeh To: maulin shah cc: caml-list@inria.fr Subject: Re: [Caml-list] stack In-Reply-To: <20010213222451.40437.qmail@web12202.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Maulin, You have not defined the "stack" variable in your code, therefore the error message. May I add that I vote Piere should continue with his thankless job of moderating this list, Just my two cents, Ohad. ---------------------------------------------------------- orodeh@cs.huji.ac.il www.cs.huji.ac.il/~orodeh On Tue, 13 Feb 2001, maulin shah wrote: > hi all, > I am a student and learning ocaml. need help for one > problem of Unbound value stack > here is my code. > > type ins =PUSH of float| IADD|ISUB;; > type stack = ins list;; > type opn = Add|Sub;; > type exp = Num of float | Opn of exp* opn *exp;; > > let rec compile exp= > match exp with > Num x-> (PUSH x)::stack > |Opn e1,Add,e2 -> compile e2, > compile e1, > (IADD)::stack;; > > gives error : unbound value stack???? > could any one clrify this??? > > thanks > maulin > ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr