daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let test str pos len=
  2.   if str.[pos-1] = ' ' then
  3.     Printf.printf "something\n"
  4.   else
  5.     failwith "Exception raised but object method missing from backtrace"
  6.  
  7. class test = object
  8.   method put str pos len =
  9.     let rec handle pos =
  10.       if pos < len then
  11.         handle (pos+1)
  12.       else
  13.         test str pos len in
  14.     handle pos
  15. end
  16.  
  17. let run_test t str =
  18.   t#put str 0 (String.length str)
  19.  
  20. let () =
  21.   Printexc.record_backtrace true;
  22.   let t = new test in
  23.   run_test t "test";;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top