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=-1.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,681c47290d0e7cac X-Google-Attributes: gid103376,public From: johnherro@aol.com (John Herro) Subject: Re: type clash in Ada Date: 1996/05/01 Message-ID: <4m7iqc$bch@newsbf02.news.aol.com>#1/1 X-Deja-AN: 152404465 sender: root@newsbf02.news.aol.com organization: America Online, Inc. (1-800-827-6364) newsgroups: comp.lang.ada Date: 1996-05-01T00:00:00+00:00 List-Id: > Hi, I am new in Ada, and it is driving me > nut for an error message: type clash > in paramater to "=" Can someone please > tell me what does this mean? You're testing if one thing is equal to another, but what you have to the left of the equal sign is not the same type as what you have to the right of the equal sign. For example, you can't write I : Integer; F : Float; ... if I = F then ... However, it's possible to create different types in a way that's not obvious to a beginner. For example, if you write A : array(1 .. 10) of Integer; B : array(1 .. 10) of Integer; then A and B have different types (even though it's not obvious to beginners), and you can't write "if A = B then ..." You would fix this by writing type Ten_Integers is array(1 .. 10) of Integer; A : Ten_Integers; B : Ten_Integers; or by writing type Int_Array is array(Integer range <>) of Integer; A : Int_Array(1 .. 10); B : Int_Array(1 .. 10); and in either case you could then write "if A = B then ..." Ada's strong type checking often causes problems at compile time for beginners, but this is an advantage, because other languages would catch these errors only at run time, or not at all. If the above doesn't help you fix your problem, please post more of your code, especially the declarations of the objects mentioned on both sides of the = sign, and we'll be glad to help you. Once you get into Ada, you'll really like it, and you won't want to program in anything else. I know; I'm an enthusiastic convert! Good luck! - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor