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,9b7af277c3cfd5e X-Google-Attributes: gid103376,public From: Paul Chardon Subject: Re: + Operator Date: 1996/12/10 Message-ID: <32AD1889.794BDF32@avions.aerospatiale.fr>#1/1 X-Deja-AN: 203287688 references: <58hf9j$bqe@uni2f.unige.ch> to: frebourg@cui.unige.ch content-type: text/plain; charset=us-ascii mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (X11; I; SunOS 4.1.3_U1 sun4m) Date: 1996-12-10T00:00:00+00:00 List-Id: Hello Fabrice, Two notes about your short program. String is a unconstrained type and therefore you can't use it to declare a variable, you must declare a constrained type built with the string type; secondly you can use the predefined unary "+" operator with any other type parameter. Here is a little example that can help you. procedure Test is subtype Str20 is String(1..20); type String_Ptr is access all Str20; function "+"(S : in Str20) return String_Ptr is begin return new Str20'(S); end "+"; My_Str20 : Str20 := (others => ' '); A_Str20_Ptr : String_Ptr; begin A_Str20_Ptr:= + My_Str20 ; end Test; Bye, Paul.