auto functions not authorized inside main?
    BCS 
    none at anon.com
       
    Mon Jun 28 07:01:46 PDT 2010
    
    
  
Hello Rory,
> On Sun, 27 Jun 2010 17:17:25 +0200, Philippe Sigaud
> <philippe.sigaud at gmail.com> wrote:
> 
>> void main()
>> {
>> auto fun(string s) { return s;} // this does not compile
>> }
>
> Hope this isn't a stupid question, but how would you access this
> function
> if it did work?
> Would it be fun("asdf")?
> Is this just shorthand for:
> auto fun = function(string s) {return s;};
I would look almost the same to the user but should in fact be a normal local 
function.
-- 
... <IXOYE><
    
    
More information about the Digitalmars-d-learn
mailing list