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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47645c013367a8d6 X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: Text control characters Date: 1997/09/11 Message-ID: <199709111334.PAA16964@basement.replay.com>#1/1 X-Deja-AN: 271594655 References: X-001: Replay may or may not approve of the content of this posting X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Organization: Replay and Company UnLimited Mail-To-News-Contact: postmaster@nym.alias.net Newsgroups: comp.lang.ada Date: 1997-09-11T00:00:00+00:00 List-Id: On 10 Sep 1997 10:24:35 -0700, woodruff@tanana.llnl.gov (John Woodruff) wrote: .. > Example: > output : constant string := "line 1 " & <*what goes here?*> & "line 2"; > > -- I want the result of > Ada.Text_IO.Put (output) ; > -- to be > line 1 > line 2 > > Partial answer: if I use > > ada.characters.latin_1.CR & ada.characters.latin_1.LF > > this works on some operating system. Is there a standard-compliant way > to solve the problem in general? The definition of a line terminator is outside the Ada language definition, being platform dependent. I don't remember of the POSIX-Ada bindings address this, and don't have them available to check. One could do generic -- Multi_Line_String_Handler Max_Line : Positive; package Multi_Line_String_Handler is subtype Line is String (1 .. Max_Line); type Multi_Line_String is array (Positive range <>) of Line; procedure Put (Item : in Multi_Line_String); end Multi_Line_String_Handler; package MLS is new Multi_Line_String_Handler (Max_Line => 6); Output : constant MLS.Multi_Line_String := ("line 1", "line 2"); .. Put (Item => Output); and be platform independent. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "English bed-wetting types." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/