From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_20 autolearn=ham autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail Newsgroups: comp.lang.ada X-Mozilla-News-Host: news://news.kpn.nl:119 From: ldries46 Subject: Hardware independent programming Date: Mon, 29 Jun 2020 06:42:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Message-ID: <5ef9712d$0$1221$e4fe514c@news.kpn.nl> NNTP-Posting-Host: bc56f9cf.news.kpn.nl X-Trace: G=r9mpqjho,C=U2FsdGVkX1+HUkI360LbYSu313dhfnJw0AzXyGol0tV/KJbG44TPYA30UoFYjV/MD2JaTJnLVW873placujIfx90oy+bJQc4pe73vVdZZuQ= X-Complaints-To: abuse@kpn.nl X-Received-Bytes: 2235 X-Received-Body-CRC: 1045203486 Xref: reader01.eternal-september.org comp.lang.ada:59240 List-Id: Hardware can in some cases have limits you have to consider when writing a program.  At this moment I can mention three: 1. The printer. The format of the documents you want to print must fit on the printers available to the user. In general the problem is solved by the possibility of printer drivers to shrink you document f.i. from A4 to A4 or saving the document to a file that can be printed elsewhere. 2. The monitor on the system your program is running. Creating a window that is to large for your screen resolution can be trouble some but you do not know the resolution of the the customer using your program. The solution for such a problem can only be hardware independent programming. Your program should know the resolution of your screen and adjust to  that or in the worst case decide that system is not suitable for the program. 3. The available memory. Your program will in some cases need to know the limits to which the heap stretches within the memory (in cases where it is necessary  to use very large bulks of data). For operating systems that have the possibility to stretch the heap with a part on disc both boundaries (with and without disc data) are of interest. There should be a package in Ada that like GNAT.OS-lib does with operating system differences, makes such hardware parameters available for the programmer.