From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id LAA26780 for caml-redistribution; Thu, 22 Feb 1996 11:38:15 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id AAA25207 for ; Thu, 22 Feb 1996 00:28:47 +0100 Received: from margaux.inria.fr (margaux.inria.fr [128.93.8.2]) by concorde.inria.fr (8.7.1/8.7.1) with ESMTP id AAA21936 for ; Thu, 22 Feb 1996 00:28:47 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by margaux.inria.fr (8.6.10/8.6.6) with ESMTP id AAA24330 for ; Thu, 22 Feb 1996 00:28:46 +0100 Received: from enst.enst.fr (enst.enst.fr [137.194.2.16]) by concorde.inria.fr (8.7.1/8.7.1) with SMTP id AAA21932 for ; Thu, 22 Feb 1996 00:28:46 +0100 (MET) Received: from chopin.enst.fr (chopin.enst.fr [137.194.32.21]) by enst.enst.fr (8.6.10/8.6.10) with SMTP id AAA23599 for ; Thu, 22 Feb 1996 00:28:42 +0100 Received: from 137.194.3.1 by liszt.enst.fr (MX V4.1 VAX) with SMTP; Thu, 22 Feb 1996 00:28:28 MET Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Mailer: Eudora F1.5.4b5 Date: Thu, 22 Feb 1996 00:31:33 +0200 To: caml-list@margaux.inria.fr From: albert@cal.enst.fr (Luc ALBERT) Subject: affichage de liste Sender: weis Bonjour voici une question suite a un echange mail avec P Dumas (inria) : je cree avec caml une liste d'entiers assez longue par exemple a l'aide de la fonction : let rec integer_interval n m = if m < n then [] else n :: ( integer_interval (n+1) m);; ou de sa version imperative let intervalle_entier n m = let accu= ref [] in for i =m downto n do accu := i :: !accu done; !accu ;; (evidemment, j'entend d'ici les remarques : la premiere version est bien plus claire et la deuxieme plus rapide et les reponses "c'est meme pas vrai et puis on est dans les annees 90" ....) la n'est pas la question (ceci dit si vous voulez reagir...) quand je les lance entre 1 et 1000 je n'obtiens que le debut de la liste (les 100 premiers termes sont affiches) : y-a-t-il une limite a l'affichage d'une liste ? merci ************************** Luc ALBERT prof prepa Lycee Charlemagne Paris 04 ************************** PS : existe-t- il un style latex2e pour une belle inclusion de programmes caml ? (avec des mots cles en gras etc ...) POOR ENGLISH VERSION A question about lists printing. Here is the code of two CAML functions let intervalle_entier n m = let accu= ref [] in for i =m downto n do accu := i :: !accu done; !accu ;; or the recursive version let rec integer_interval n m = if m < n then [] else n :: ( integer_interval (n+1) m);; the matter is not the comparison between the two versions of the function but deals with the printing of the result. If one executes these functions with arguments n=1 and m=1000 for instance, only the beginning of the list is printed (the first 100 terms I think). Is there a limit to output- printing ? Thanks ************************** Luc ALBERT Teacher at Lycee Charlemagne Paris (France ! yeah) ************************** PS: is there a latex2e style to include in an esthetic way caml programs in documents ? (with bold-faced key words, smart indentation etc ...)