Page 1 of 1

read, write, readln, writeln

Posted: 01 Jul 2011 18:35
by LGR
I suggested this many years ago, when the only target machines you had were 8-bit PICs. Now that you have a broad array including 16 and 32 bit targets, I think it's time to reconsider this.

Instead of the plethora of differing approaches for different libraries, I think it would be a large improvement to use a conventional console approach to device I/O. This would involve implementing the Pascal procedures read, write, readln, and writeln from the original Jensen/Wirth Pascal report. There are equivalent functions in C.This would be the common interface to many devices and libraries, including UART, MMC, USB, TCP/IP, EEPROM, LCD, and various GLCDs when using text. One would set the console device to one of these hardware devices, and then use these procedures/functions to write characters and strings to the selected device. In some cases, they would be write only (LCD), and others could be read or write. The existing library interface procedures would remain as an alternative.

I don't believe that this would be that difficult to implement on the 16 and 32-bit platforms, and would make I/O much easier and more readable. The package manager would have to provide for new devices to be added to the list of console devices.

Re: read, write, readln, writeln

Posted: 04 Jul 2011 10:08
by filip
Hi,

Thank you for your suggestion, I will pass it to our developers.

Regards,
Filip.