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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e3fdc7c00d74a44f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-05 04:08:10 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.27.83.146!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Characters and Numerics Date: Wed, 5 Dec 2001 12:07:56 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1007554076 15704 217.17.192.37 (5 Dec 2001 12:07:56 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Wed, 5 Dec 2001 12:07:56 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:17438 Date: 2001-12-05T12:07:56+00:00 List-Id: * Duke Luke wrote: >How can I change type character to type natural?? >e.g: '3' -> 3; S'Value denotes a function with the following specification: function S'Value(Arg : String) return S'Base; This function returns a value given an image of the value as a String, ignoring any leading or trailing spaces. For the evaluation of a call on S'Value for an enumeration subtype S, if the sequence of characters of the parameter (ignoring leading and trailing spaces) has the syntax of an enumeration literal and if it corresponds to a literal of the type of S (or corresponds to the result of S'Image for a value of the type), the result is the corresponding enumeration value; otherwise Constraint_Error is raised. For a numeric subtype S, the evaluation of a call on S'Value with Arg of type String is equivalent to a call on S'Wide_Value for a corresponding Arg of type Wide_String. => Natural'Value ((1 => '3'));