Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] stack
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ohad Rodeh <orodeh@c...>
Subject: Re: [Caml-list] stack
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