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.3 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,146ef816afa699d1,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.27.230 with SMTP id w6mr20682427pbg.3.1318754938071; Sun, 16 Oct 2011 01:48:58 -0700 (PDT) Path: d5ni15430pbc.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feed.xsnews.nl!border-2.ams.xsnews.nl!upload-2.xsnews.nl!10.10.69.14.MISMATCH!frontend-F09-14.ams.news.kpn.nl From: "ldries46" Newsgroups: comp.lang.ada Subject: Length of unbounded_string. Date: Sun, 16 Oct 2011 10:48:36 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513 X-MIMEOLE: Produced By Microsoft MimeOLE V15.4.3538.513 Message-ID: <4e9a9a6d$0$3238$703f8584@news.kpn.nl> Organization: KPN.com NNTP-Posting-Host: 77.168.179.107 X-Trace: 1318754925 news.kpn.nl 3238 77.168.179.107@kpn/77.168.179.107:60369 Xref: news2.google.com comp.lang.ada:13969 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Date: 2011-10-16T10:48:36+02:00 List-Id: In my program I use unbounded_string str I want to change the last character of the string using the program lines 2205 len := Length(str); 2206 Replace_Slice(str, len, len, "G"); Then I get the following message printed in my exception part of the program Error type : CONSTRAINT_ERROR In phase : Step 1 in function : Continuation Error info : trans2ada.adb:2206 range check failed file line nr : 1 Original line : /* GtkPrintJob Next line : * Copyright (C) 2006 John (J5) Palmieri In this print out the Original line represents "str". Is there a problem with the Length function or do I interpret something wrong? I use the GNAT GPS environment : GPS 5.0.1 (20110113) hosted on i686-pc-mingw32 GNAT GPL 2011 (20110428) L. Dries