From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!BGUVM.BITNET!GDAU100 From: GDAU100@BGUVM.BITNET ("Jonathan B. Owen") Newsgroups: comp.lang.ada Subject: TEXT_IO anomality Message-ID: <9007241309.AA00417@ajpo.sei.cmu.edu> Date: 25 Jul 90 07:03:32 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet X-Unparsable-Date: Tue, 24 Jul 90 11:06:30 IST List-Id: 1. When using TEXT_IO procedures and function without a file parameter, STANDARD_INPUT and STANDARD_OUTPUT are used according to the type of service (i.e. Get or Put, mainly). Unlike the clarity of the above defaults, the SET_COL and COL functions apply both to standard input and output. As far as I know, these services without a file parameter default to STANDARD_OUTPUT. Is this mentioned or defined in the LRM? 2. When doing a Get_line, the user terminates input by pressing . This moves the screen cursor to Col 1 of the following line (and the COL counter of STANDARD_INPUT is updated accordingly). Still, the COL counter of STANDARD_OUTPUT remains as before. This causes a difficulty when output relys on first obtaining this value and using it for printing multiple lines at specific column. Since first line is printed at column 1 even though counter is not so. Attempting to do a TEXT_IO.SET_COL( TEXT_IO.COL ) will not work, since this will have no effect. Also, if you would like to correct the COL counter of STANDARD_OUTPUT by doing SET_COL(1), so it will be in accord to the screen cursor, you will result with a blank line (assuming that the counter was greater than 1). Here's a demonstrations of the problem: Put("Prompt> "); Get_line(buffer, last_pos); declare c : TEXT_IO.Count := TEXT_IO.COL; begin for i in 1..5 loop -- Adding here Set_col(c) will do nothin in Verdix Ada -- since delta between c and TEXT_IO.COL is zero! Put_line("All lines should start from same column!"); TEXT_IO.Set_col(c); end loop; end; Output will look like this: Prompt> Humph All lines should start from same column! All lines should start from same column! All lines should start from same column! All lines should start from same column! All lines should start from same column! Any thoughts? Comments? Suggestions? Jonathan B. Owen ______________________________________________________________________________ (--) /--) /-(\ Email: gdau100@bguvm (bitnet) \ / /--K | \|/\ /\/) /|-\ Snail: 55 Hovevei Zion _/_/o /L__)_/o \/\__/ \X/ \_/ | |_/ Tel-Aviv, 63346 ISRAEL (/ Jonathan B. Owen Voice: (03) 281-422 Point of view: A chicken is the means by which an egg reproduces an egg. ______________________________________________________________________________