Re: [cc65] Feature request: default arguments for functions.

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-07-26 20:17:59
Hi!

On Sat, Jul 25, 2009 at 06:45:06PM +0200, Markus Stehr wrote:
> Could this be put on the todo list please? It would be a nice feature to
> have. I mean something like this:
> void putbigchar(char x, char y, char c, char co=1);
>
> Its not urgent, but it would be a nice feature to have. :)

It's not C and not easily doable with the current compiler structure. While
using constants of basic types would be ok, more complex scenarios like

  extern char bar;
  ...
  void putbigchar(char x, char y, char c, char co = getfoo() + bar);
                                       
need an internal representation of compiled code. Inline functions aren't
available for the same reason.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jul 26 20:20:33 2009

This archive was generated by hypermail 2.1.8 : 2009-07-26 20:20:35 CEST