Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-02-13 (22:24)
From: maulin shah <maulincs510@y...>
Subject: [Caml-list] stack
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,

gives error : unbound value stack????
 could any one clrify this???


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!
To unsubscribe, mail  Archives: