Interpretation of "case x of " with ocaml

can anyone give me the interpritation of this in ocaml plz , i’m interprte a langague impirative :
case x of
v1:c1 ;
v2:c2;
v3:c3 ;

vn:cn

Hi @Moumen_Med, this seems pretty similar to your previous post, Ocaml match with.

It’s not really clear what you are asking here. case is not an OCaml language feature, so this looks like you are trying to write an OCaml interpreter for some other language. But without the context of that other language, it’s unclear what this question even means.

Furthermore, as a general rule, homework questions are not going to be answered in this forum, especially questions of the form “please write code that does this for me”. If you are able to ask your question in terms of general concepts you need help with, or example code you do not understand, that would be a more suitable question for this forum.

6 Likes