* Re: New_Page [not found] <zH%1h.42912$XE5.888@reader1.news.jippii.net> @ 2006-11-01 12:19 ` Georg Bauhaus 2006-11-01 18:29 ` New_Page Jeffrey R. Carter 1 sibling, 0 replies; 8+ messages in thread From: Georg Bauhaus @ 2006-11-01 12:19 UTC (permalink / raw) On Wed, 2006-11-01 at 13:39 +0200, Tapio Marjomäki wrote: > Hi, > > could somebody tell why the procedure below does not run as expected? > > with Ada.Text_IO; use Ada.Text_IO; > -- with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; > procedure Page is $ ./page |cat -v 0 New page ^LNew page ^LNew page ^L I believe the ^L is called a format effector, to be interpreted by the printer or terminal. -- Georg ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page [not found] <zH%1h.42912$XE5.888@reader1.news.jippii.net> 2006-11-01 12:19 ` New_Page Georg Bauhaus @ 2006-11-01 18:29 ` Jeffrey R. Carter 2006-11-01 19:35 ` New_Page Robert A Duff 1 sibling, 1 reply; 8+ messages in thread From: Jeffrey R. Carter @ 2006-11-01 18:29 UTC (permalink / raw) Tapio Marjom�ki wrote: > > could somebody tell why the procedure below does not run as expected? Probably because you have unreasonable expectations. Since we don't know what your expectations are, we can't be more specific. It would also help if we knew what compiler you were using. New_Page typically puts one or more control characters ("format effectors") into the specified file (with no explicit file, this is Current_Output; if not explicitly set, Current_Output is Standard_Output). What those characters are is up to the compiler writer. What those characters do when sent to various output devices is up to the creators of those output devices. It is likely that the new-page character(s) output by your compiler are those that cause a new page on some device other than a Windows console, and are not those needed by a Windows console. In short, New_Page is device-specific, should probably not have been included in Text_IO, and should be avoided in portable SW. -- Jeff Carter "My mind is a raging torrent, flooded with rivulets of thought, cascading into a waterfall of creative alternatives." Blazing Saddles 89 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page 2006-11-01 18:29 ` New_Page Jeffrey R. Carter @ 2006-11-01 19:35 ` Robert A Duff 2006-11-02 2:14 ` New_Page Jeffrey R. Carter 2006-11-02 20:57 ` New_Page Keith Thompson 0 siblings, 2 replies; 8+ messages in thread From: Robert A Duff @ 2006-11-01 19:35 UTC (permalink / raw) "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org> writes: > In short, New_Page is device-specific, should probably not have been > included in Text_IO, and should be avoided in portable SW. New_Line isn't exactly portable, either. ;-) - Bob ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page 2006-11-01 19:35 ` New_Page Robert A Duff @ 2006-11-02 2:14 ` Jeffrey R. Carter 2006-11-02 19:20 ` New_Page Tapio Marjom�ki 2006-11-02 20:57 ` New_Page Keith Thompson 1 sibling, 1 reply; 8+ messages in thread From: Jeffrey R. Carter @ 2006-11-02 2:14 UTC (permalink / raw) Robert A Duff wrote: > > New_Line isn't exactly portable, either. ;-) What it outputs isn't always portable to other platforms, that's for sure. On the intended platform, though, it usually works OK. -- Jeff Carter "My mind is a raging torrent, flooded with rivulets of thought, cascading into a waterfall of creative alternatives." Blazing Saddles 89 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page 2006-11-02 2:14 ` New_Page Jeffrey R. Carter @ 2006-11-02 19:20 ` Tapio Marjom�ki 2006-11-02 19:53 ` New_Page Pascal Obry 0 siblings, 1 reply; 8+ messages in thread From: Tapio Marjom�ki @ 2006-11-02 19:20 UTC (permalink / raw) ... so we can say that New_Page doesn't work on MS XP console application on GNAT Ada compiler? "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org> wrote in message news:dwc2h.1047017$084.491837@attbi_s22... > Robert A Duff wrote: >> >> New_Line isn't exactly portable, either. ;-) > > What it outputs isn't always portable to other platforms, that's for sure. > On the intended platform, though, it usually works OK. > > -- > Jeff Carter > "My mind is a raging torrent, flooded with rivulets of > thought, cascading into a waterfall of creative alternatives." > Blazing Saddles > 89 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page 2006-11-02 19:20 ` New_Page Tapio Marjom�ki @ 2006-11-02 19:53 ` Pascal Obry 0 siblings, 0 replies; 8+ messages in thread From: Pascal Obry @ 2006-11-02 19:53 UTC (permalink / raw) To: Tapio Marjomäki Tapio Marjom�ki a �crit : > .... so we can say that New_Page doesn't work on MS XP console application on > GNAT Ada compiler? No, we can say that the Windows console does not handle a new page code (FF - ASCII#12). Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page 2006-11-01 19:35 ` New_Page Robert A Duff 2006-11-02 2:14 ` New_Page Jeffrey R. Carter @ 2006-11-02 20:57 ` Keith Thompson 2006-11-03 1:17 ` New_Page Robert A Duff 1 sibling, 1 reply; 8+ messages in thread From: Keith Thompson @ 2006-11-02 20:57 UTC (permalink / raw) Robert A Duff <bobduff@shell01.TheWorld.com> writes: > "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org> writes: > >> In short, New_Page is device-specific, should probably not have been >> included in Text_IO, and should be avoided in portable SW. > > New_Line isn't exactly portable, either. ;-) New_Line produces an end-of-line marker. The way this is represented varies from one system to another, but this is a *very* well-known issue, and translating from one format to another is extremely common. New_Page produces an end-of-page marker. Most systems don't even have such a thing. I agree that all the page-oriented stuff should have been left out of the language. -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New_Page 2006-11-02 20:57 ` New_Page Keith Thompson @ 2006-11-03 1:17 ` Robert A Duff 0 siblings, 0 replies; 8+ messages in thread From: Robert A Duff @ 2006-11-03 1:17 UTC (permalink / raw) Keith Thompson <kst-u@mib.org> writes: > Robert A Duff <bobduff@shell01.TheWorld.com> writes: >> "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org> writes: >> >>> In short, New_Page is device-specific, should probably not have been >>> included in Text_IO, and should be avoided in portable SW. >> >> New_Line isn't exactly portable, either. ;-) > > New_Line produces an end-of-line marker. The way this is represented > varies from one system to another, but this is a *very* well-known > issue, and translating from one format to another is extremely common. Indeed. It's sad, but true. > New_Page produces an end-of-page marker. Most systems don't even have > such a thing. Well, control-L is pretty widely recognized as a form-feed, at least on hardware where that makes sense. > I agree that all the page-oriented stuff should have been left out of > the language. Not sure whom you're agreeing with, but I agree with that, too. I think Text_IO is badly designed, for many reasons, including this one. - Bob > We must do something. This is something. Therefore, we must do this. ;-) ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-11-03 1:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <zH%1h.42912$XE5.888@reader1.news.jippii.net> 2006-11-01 12:19 ` New_Page Georg Bauhaus 2006-11-01 18:29 ` New_Page Jeffrey R. Carter 2006-11-01 19:35 ` New_Page Robert A Duff 2006-11-02 2:14 ` New_Page Jeffrey R. Carter 2006-11-02 19:20 ` New_Page Tapio Marjom�ki 2006-11-02 19:53 ` New_Page Pascal Obry 2006-11-02 20:57 ` New_Page Keith Thompson 2006-11-03 1:17 ` New_Page Robert A Duff
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox