I think you should do :
main() {
...
foo((unsigned char)133);
...
}
becasue SDCC asume that 133 is an integer, with the cast you should solve
the problem.
Cheers,
Olgierd
2008/6/3 Cyberalex <[EMAIL PROTECTED]>:
> I'm using a pin 18f1220 and i have to make some function with
> parameters but they don't work..
> For example:
>
> void foo(unsigned char c) {
> PORTB = c;
> }
>
> main() {
> ...
> foo(133);
> ...
> }
>
> don't work but:
>
> main() {
> ...
> PORTB = 133;
> ...
> }
>
> works well..
> Why?
>
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user