Evil Twisting of EasyC 2.x

Tswift1 needs a “puts()” function for a project.

EasyC 2.0 won’t let you create functions that receive pointers for a parameter. Unless you use a little evil.

PrintToScreen has no String or Char support. :frowning:

=======================================
Using directives with Print to screen

Directive__________Variable____PrintToScreen Output
%d__________int x = -100______-100
_____%u__________unsigned int x = 100_____100
_____%x__________int x = 255_______________ff
_____%X__________int x = 255______________FF
_____%lx__________int x = 255_____________0ff
_____%b__________int x = 100________1100100

=======================================

These example programs output each Character as a Binary Value, one per line.
Tswift1_20081114-001.zip (4.34 KB)

Hi MarkO,

Your solution worked perfectly!!! Thanks.

I can now print strings on the LCD display connected to the Vex Controller shown in the gallery. Any ideas how I can convert integer values and floats to ASCII (C itoa and ftoa functions) using Easy C 2.0?