Guest User

Untitled

a guest
Nov 8th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. This is my p.ml: ("p" for process)
  2. --begin
  3. (* We're getting a string. *)
  4. let process x =
  5. let r = "" in
  6. for i = 0 to (String.length(x)) do
  7. r.[i] <- x.[i];
  8. done;
  9. r;;
  10.  
  11. open Printf;;
  12. printf (process "abc$or");;
  13. --end
  14.  
  15. This is the error I get:
  16.  
  17. gustav@gustav-P15xEMx:~/public_html$ ocaml str.cma p.ml
  18. File "p.ml", line 11, characters 7-25:
  19. Error: This expression has type string but an expression was expected of type
  20. ('a, out_channel, unit) format =
  21. ('a, out_channel, unit, unit, unit, unit) format6
  22.  
  23. What the deus?
Advertisement
Add Comment
Please, Sign In to add comment