Subj : function expression To : netscape.public.mozilla.jseng From : =?ISO-8859-1?Q?Georg_Maa=DF?= Date : Sat Jan 17 2004 03:57 pm This works: js> (function banana(){banana.taste='fruchtig';print(banana.taste);})(); fruchtig This fails: js> function banana(){banana.taste='fruchtig';print(banana.taste);}(); 94: SyntaxError: syntax error: 94: function banana(){banana.taste='fruchtig';print(banana.taste);}(); 94: ................................................................^ Why is this not recognized as function expression? The compiler assumes that this is a function declaration, but it is a function expression. If this is invalid, how can I detect this from the spac, that this is invalid? Greetings, Georg -- Georg Maaß - bioshop.de D-76227 Karlsruhe, Westmarkstraße 82 HTML, XML / JavaScript, C++, Java, PHP, VB / CGI, JSP, ASP, ASP.net - The ultimate DHTML engine: http://gml-modul.sourceforge.net - http://sourceforge.net/projects/gml-modul .