Re: [cc65] ca65 Users Guide Errors?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-09-02 21:58:34
Hi!

On Thu, Aug 30, 2012 at 12:01:33PM -0400, Michael Bazzinotti wrote:
> 12.6 .LOCAL
> -------------
> Look at the last macro in this section:
> http://www.cc65.org/doc/ca65-12.html#ss12.6
[...]
> 11.48 .IFBLANK
> ---------------
> 2nd paragraph
> http://www.cc65.org/doc/ca65-11.html#ss11.48

These two are errors. Thanks for the report, I will fix them.

> 12.7 C Macros
> -----------
[...]
> 1st question: How is .macro working correctly?? 

Dito here. It should read

            .macro  DEBUG message
                    .out    message
            .endmacro

> 2nd question: If the assembler cannot detect the end of one parameter
> in C macros, how does it detect > 1 parameter?? 

It doesn't detect how many parameters are there. It will just use the first
one and ignore the following ones (which will stay part of the normal input
stream and processed outside of the macro expansion).

> and by saying only the
> first token is used, does that mean if my parameter is "message", the
> only the "m" is used???

"Token" is something else than "character". A token consists of one or more
input characters. A token may have an attribute attached. In case of a string
this is the string content, in case of a number it's the value.

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 Sep 2 21:58:42 2012

This archive was generated by hypermail 2.1.8 : 2012-09-02 21:58:46 CEST