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
Re: [Caml-list] help
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-16 (19:01)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] help
On Sat, 2004-04-17 at 04:04, mohammad siddiqui wrote:
> Hi,
> I started the conversion project after completely getting hold of ocaml but 
> I still have some concerns like how we can manage pinters and pointer to 
> pointers,

Generally you don't need them. Here is an example: in C:

struct ilist { list *next; int v; };

In Ocaml:

type ilist = Cons of int * ilist | Empty

The * there means 'tuple' not pointer, in Ocaml
everything except an int is already a pointer.

>  some functions in C like exit(), isspace().

exception Exit
The Exit exception is not raised by any library function. It is provided
for use in your programs.

isspace is easy to implement:

let isspace = function
| ' ' | '\t' -> true
| _ -> false

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: