-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Chant schrieb:
> I'm trying to compile the following function for the PIC14 port:
> 
> void Writef( char *string) {
>               
>       while(*string != 0) {
>               putchar(*string);
>               string++;
>       }       
> }
> 
> Note, no printf in the PIC14 port.
> 
> I call it as:
> 
> Writef('The quick brown fox jumps over the lazy dog.\0');

Hmm, I see two problems here:
1) You used ' instead of "
Writef("The quick brown fox jumps over the lazy dog.\0");
2) There's a const missing
void Write(const char *string) {

Most of the time sdcc is too stupid to notice problems of type 2), so I
suppose 1) caused the error.
Philipp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFH50ObtUV+xsoLpoRAgRpAKDHsaN3PjJFWEuenut3JupL97KIMQCgr4vd
qMWqFzDzwB/wIC1kLaxwkIw=
=vFu0
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to