User talk:Dmitry-kazakov: Difference between revisions

Content added Content deleted
mNo edit summary
(Portability of PPMs)
Line 10: Line 10:
About the problem you talk about on the ppm output article, I am used to see that it is possible to open a file ''in binary mode'' on your OS. <BR>
About the problem you talk about on the ppm output article, I am used to see that it is possible to open a file ''in binary mode'' on your OS. <BR>
Isn't it possible with this programming language ? [[User:Blue Prawn|Blue Prawn]] 11:28, 7 December 2008 (UTC)
Isn't it possible with this programming language ? [[User:Blue Prawn|Blue Prawn]] 11:28, 7 December 2008 (UTC)

: It is OS-specific too. In earlier times, when OS was an OS (:-)), there was RSX-11, for example. It didn't have text files in MS-DOS or UNIX sense. There were record files instead. Each line was stored into a record. The advantage was that a line could contain any characters and LF, CR or NUL had no special meaning.
: I will rewrite Ada solution in order to make it more portable, but I am afraid the problem with it and other solutions as well will persist. Because if we used ''binary'' in the sense ''stream of characters'', then we would have to specify a few more things to make it portable:
:* character is? (octet of bits)
:* line terminator in the file header is? (ASCII LF for example)
:* EOF is? (ASCII LF, NUL, nothing)
:And well, PPM isn't our fault... (:-)) --[[User:Dmitry-kazakov|Dmitry-kazakov]] 12:17, 7 December 2008 (UTC)