read, write, readln, writeln

Post your requests and ideas on the future development of mikroPascal PRO for PIC32.
Post Reply
Author
Message
LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

read, write, readln, writeln

#1 Post by LGR » 01 Jul 2011 18:35

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.
If you know what you're doing, you're not learning anything.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: read, write, readln, writeln

#2 Post by filip » 04 Jul 2011 10:08

Hi,

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

Regards,
Filip.

Post Reply

Return to “mikroPascal PRO for PIC32 Wish List”