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,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7ccbf31c901dc851 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: defining functions Date: 1999/11/24 Message-ID: <81hbf1$6fb$1@nnrp1.deja.com>#1/1 X-Deja-AN: 552533371 References: <81gthb$kej$1@bunyip.cc.uq.edu.au> X-Http-Proxy: 1.0 x42.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Nov 24 18:40:34 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-11-24T00:00:00+00:00 List-Id: In article <81gthb$kej$1@bunyip.cc.uq.edu.au>, "Riyaz Mansoor" wrote: > when i try to define a function as below my compiler tells me the name > is invalid. when i change the name to "=" it works fine. is this a > compiler specific problem? or ada restriction? > > function "==" (Stack1, Stack2 : in Stack) return Boolean; No. You do not get to create your own binary operators with any series of random characters you choose. You are restricted to the ones the language provides. I was a smidge diappointed when I first figured that out myself. > anyway i can tell the compiler to accept "==" as a valid name? No. You'll have to stick to Ada/Pascal/Modula/Oberon syntax for equality and assignment. Sorry. But on the bright side, you'll make less compilable typos this way. -- T.E.D. Sent via Deja.com http://www.deja.com/ Before you buy.