Hello, I want to write tables of values/codes. It is given the number of digits of a code and the number of possible values for each digit (base of the code). ...
oliver@...
Jan 3, 2003 12:35 pm
705
Why do the standard libraries use ";;" between definitions? Is this purely a hangover from an older syntax, or is there a useful purpose served? (Ie, should I...
... It has at least two advantages: 1) It makes explicit your wish to end a top-level statement. This tends to make the compiler generate more understandable...
... Hello to everybody and Happy New Year to all. I've gone a long way round trying to make my way out of GTK and long holidays... here are my discoveries. 1)...
Stalkern 2 <stalkern2@...> writes: [...] ... [...] ... well, It would be better to use a mutable instance variable, but yes you mat need mutable state to do...
Hello Everyone, Thank you all for making such a great language/toolset! I am new to this functional programming/OCaml but i already like it al lot. I have...
Hi, ... The problem may come from the environment variable CAMLP4LIB. Check it is not set, or set it to "C:\Program Files\Objective Caml\lib\camlp4" -- Daniel...
Daniel de Rauglaudre
daniel.de_rauglaudre@...
Jan 9, 2003 11:04 am
711
Hello Daniel! [Setting CAMLP4LIB environment variable] Yes, that fixed the problem! Sorry for bugging you with beginner questions :-) Thank you! Sander Hahn...
... This is after all a list for beginners:) If you can't ask it here, where would you ask it? Regards. Johann -- Johann Spies Telefoon: 021-808 4036...
Johann Spies
jspies@...
Jan 9, 2003 1:39 pm
713
... I've tried to do that made it in a different way: I could not declare a val mutable using "self" because instances of the same class seem unwilling to use...
... It why you have to use a mutable instance : you need to set it to some dummy value, then initializing it to its real value after the construction of the...
... No, the C compiler binary is hard coded. ... Yes, you will need Cygwin, but the recompilation is pretty straight-forwarward -- just follow readme.win32...
Dmitry Bely
dbely@...
Jan 11, 2003 5:26 am
716
The problem is Labltk has a new syntax different than the old Camltk library. You no longer specify the Tk widget attributes using the bracketed syntax as in...
Howdy, I don't know what development setup you have, but I highly recommend learning emacs. You can use emacs to leverage the advantage of the ocaml toplevel...
I haven't spent a lot of time thinking about your problem but the first thing that popped into my mind was why use a list when you can define your own type...
... because, generally speaking, it's better to use already define data-structure when you can : it's more readable and there are some function in the stdlib...
Hello, I tried the ocamllex/ocamlyacc-example, which is given in the Ocaml reference manual. It's nice: It needs not much code and works correctly. :) It's...
oliver@...
Jan 13, 2003 10:25 am
721
... This likely occurs because you have not modified the yacc rules consequently. The types are defined in the type part of the yacc file. They are used in the...
... well, in the parser, the lexer return token to the parser (token are the PLUS, MINUS ... INT of int one may add VAR of string if needed (you have to add ...
Hi, ... Yes, I know. ... Well. I may want it, but maybe I don't want it. In the case I want to solve (the "language" I want to implement), I only have to set...
... That is exactly the point: your actions are typed to int, but then you switched to unit. Ocamlyacc won't let you go on this way! A quick and dirty solution...
... [...] OK, here I am. Another little -ehm!- point with ocaml + GTK is that it's 99% OOP... now I've read the great ocaml OOP tutorial by Didier Rémy and I...
... Yes, but it's surely better to define a tree as type 'a tree = Node of 'a tree * 'a * 'a tree ... Rather than mess with lists and 2n/2n+1 formula... what...
Hi, ... OK, the confusing thing is, that the lexer (written in lexer.mll) only gives back the values in appropriate types, but the declaration of the types is...
oliver@...
Jan 15, 2003 8:30 pm
730
Hello OCaml/Camlp4-people! I am unable to define an anonymous parser inside my parser when it is ... let s = [<'5; '6; '7>];; let t = [<'3; '3; '3; '3; s;...
Hi, ... It is because it is interpreted as: y = threes; x = parser [<'4>] -> 4 | [<>] -> (0; '5 ?? "'5' expected") To avoid that, write your parser between...
Daniel de Rauglaudre
daniel.de_rauglaudre@...
Jan 15, 2003 8:44 pm
732
... Well, of course, when you need a tree, you have to define it, but, when you need list, you should use those of the stdlib. the type : type 'a code = End of...
... Let's stay cool... and step back a little. I know a very sound way of correcting myself :-) It's based upon tracking my moves stepwise, starting from the...