Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-09

Hex chars

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul Aviles

I am trying to write to a serial LCD device on /dev/ttys0 and I need to pass hex codes to it. According to the documentation, in C is done like this:

putch(0xfe);
putch('X');

What will be the similar commad in FPC?

Thanks
-pa

Marco van de Voort
to Paul Aviles
Show quoted text 6 lines
I am trying to write to a serial LCD device on /dev/ttys0 and I need to pass hex codes to it. According to the documentation, in C is done like this: putch(0xfe); putch('X'); What will be the similar commad in FPC?
write(chr($FE),'X');