Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!pluto.hemel.bull.co.uk!pmoore From: pmoore@hemel.bull.co.uk (Paul Moore) Newsgroups: comp.std.c++ Subject: default value specifications Message-ID: <1990Dec12.122646.13874@hemel.bull.co.uk> Date: 12 Dec 90 12:26:46 GMT Organization: Bull HN UK Lines: 27 Has anybody proposed a feature to allow more control over the use of default values in function specifications? The area I am trying to address is as follows:- funca(int i,int j,int k=1, int l=1) With this syntax is is possible to invoke funca with both k and l not given, and with l not given, but it is not possible to invoke funca giving l but not k. I can imagine several syntaxes that would allow this to be performed funca(1,2,,3); funca(1,2,*,3); // or some other character funca(1,2, l=3); The last one is a more fundamental change as it requires knowledge of the data names used in the function definition. There are some C implementations that allow the complete use of parameter association by name rather than position (taken from ADA I think), a discussion of the usefulness of that construct should not take place here, although it's not an unreasonable discussion to have. My preference is for the first construct as it seems the most natural and does not involve adding any extra meaning to any tokens, or defining new tokens.