Re: Reply: The # character

"Oliver Bandel [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Hi,



> Am 25.12.2014 um 13:52 schrieb 'mithrill.real' [email protected] [ocaml_beginners] <[email protected]>:
> 
> In ocaml, object # method mean call method of object.
> 
> "[email protected] [ocaml_beginners]" <[email protected]>编写:
> 
>  
> 
> In reading about 'Netchannels' in Ocamlnet, I stumbled upon this code:
> 
> 
> 
> let sum_up (ch : in_obj_channel) =
> 
>   let sum = ref 0 in 
> 
>   try 
> 
>     while true do 
> 
>       let line = ch # input_line() in 
> 
>       sum := !sum + int_of_string line 
> 
>     done; 
> 
>     assert false 
> 
>   with 
> 
>     End_of_file -> 
> 
> 
>       !sum
> 
> 
> 
> Which contains a # character. Using Google, it is very difficult to search for single characters. Thus I have currently failed to figure out what the # character does in Ocaml.
> 

Ocamlnet is using OOP heavily.
So, it is a method call.

The refence manual contains an index at the end, there you can find explanations, I think.

Ciao,
   Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.