[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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, mailto:skaller@users.sf.net
voice: 061-2-9660-0850,
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners