From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,76878622fd40c57 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-19 04:36:13 PST Path: nntp.gmd.de!xlink.net!fauern!zib-berlin.de!prise.nz.dlr.de!news.dfn.de!darwin.sura.net!gwu.edu!gwu.edu!not-for-mail From: mfeldman@seas.gwu.edu (Michael Feldman) Newsgroups: comp.lang.ada Subject: Re: GNAT-Problem Set_Line(), Set_Col() Date: 15 Nov 1994 12:36:04 -0500 Organization: George Washington University Message-ID: <3aari4$jlc@felix.seas.gwu.edu> References: <395jba$kbs@tucs6.rz.tu-cottbus.de> <3aad5q$qn9@watnews1.watson.ibm.com> NNTP-Posting-Host: 128.164.9.3 Date: 1994-11-15T12:36:04-05:00 List-Id: In article <3aad5q$qn9@watnews1.watson.ibm.com>, Norman H. Cohen wrote: >In article <395jba$kbs@tucs6.rz.tu-cottbus.de>, ak@informatik.tu-cottbus.de >(Andreas Krohn) writes: > >|> When I use these functions with a variable then the compiler says >|> "Invalid parameter list in call". >|> If it is a number then it works. Where is the problem ? > >My guess is that you've declared the variables to be of type Integer. >Set_Line and Set_Col take parameters of the integer type Text_IO.Count. >(An integer literal is acceptable where a value of any integer type is >expected.) I'd like to hear from Norm or another Ada Wise Person why it was thought necessary to declare a new type for Text_IO.Count, instead of simply using Positive. I know the usual arguments about portability and predefined types, but of course Text_IO.Count is also a predefined type with implementation defined range, so the advantage is not at all obvious. In my opinion, the use of a new type here causes exactly the kind of confusion Andreas encountered; are the benefits of a distinct type in this case worth it when balanced against the confusion? Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - chair, SIGAda Education Working Group Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5919 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet) ------------------------------------------------------------------------ Ada on the World-Wide Web: http://lglwww.epfl.ch/Ada/ ------------------------------------------------------------------------ "Non illegitimi carborundum." (Don't let the bastards grind you down.) ------------------------------------------------------------------------