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] Why isn't 4=4 in a bytecode program?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-21 (12:22)
From: Florian Hars <florian@h...>
Subject: [Caml-list] Why isn't 4=4 in a bytecode program?
(I think I have sent this before with the wrong sender address, so a 
copy may still be lingering in the list owners inbox, please delete it)

I'm lost, what happens here:

58       <|b|>if p = l then true
(ocd) print p
p : int = 4
(ocd) print l
l : int = 4
(ocd) step
Time : 396277983 - pc : 68528 - module Stringhilfsfunktionen
59       else <|b|>if pat.[p] <> s.[p] then false
(ocd) step
Time : 396277984
Program end.
Uncaught exception: Invalid_argument("String.get")

This happens with
$ ocamlc -v
The Objective Caml compiler, version 3.01
Standard library directory: /usr/lib/ocaml
$  dpkg -l ocaml | grep ocaml
ii  ocaml          3.01-6         ML language implementation with a class-base

The program works if I compile it with ocamlopt (and I think I have
turned -unsafe off).

Yours, Florian Hars.

Bug reports:  FAQ:
To unsubscribe, mail  Archives: