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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f28dd1d63a9466b2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-16 06:56:39 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!newsfeed.pitt.edu!uunet!in1.uu.net!era!era!spencer From: spencer@ERA.COM (Spencer Allain) Subject: Re: Syntax question In-Reply-To: dweller@Starbase.NeoSoft.COM's message of 15 Mar 1995 20: 25:11 -0600 Message-ID: Sender: news@ERA.COM Nntp-Posting-Host: calvin.era.com Organization: Engineering Research Associates, Vienna, VA References: <3jt25s$dim@felix.seas.gwu.edu> <3k7t8o$4pt@hacgate2.hac.com> <3k87i7$q7g@Starbase.NeoSoft.COM> Date: Thu, 16 Mar 1995 14:44:30 GMT Date: 1995-03-16T14:44:30+00:00 List-Id: In article <3k87i7$q7g@Starbase.NeoSoft.COM> dweller@Starbase.NeoSoft.COM (David Weller) writes: In article <3k7t8o$4pt@hacgate2.hac.com>, David Kusuda wrote: > b) Omit parameters which have default values. I think that this > is very useful, too bad C++ doesn't have the same thing. > It does, too! All you hafta do is add another member function with the new parameter list. After that, all it is is just another recompile :-) Just as a clarification, not as a defense, C++ does allow omission of defaulted parameters. The function declared as void func(int first, int second = 2, int third = 3) ; can be accessed in any of the three following ways. func(4, 5, 6) ; func(4, 5) ; func(4) ; What you cannot do is something of this nature, func(4, third:6); since binding of variables is purely positional, and there is no such thing as the "third:" syntax shown above. This is what I assume was referred to when mentioning that C++ was unable to omit (intermediate) parameters with default values. Spencer Allain Engineering Research Associates Vienna, VA 22182