affichage de liste

Luc ALBERT (albert@cal.enst.fr)
Thu, 22 Feb 1996 00:31:33 +0200

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

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 ...)