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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.158.196 with SMTP id ww4mr2080440obb.34.1422563963409; Thu, 29 Jan 2015 12:39:23 -0800 (PST) X-Received: by 10.182.148.36 with SMTP id tp4mr21563obb.39.1422563963218; Thu, 29 Jan 2015 12:39:23 -0800 (PST) Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!hl2no4498577igb.0!news-out.google.com!qk8ni19963igc.0!nntp.google.com!hl2no4498570igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 29 Jan 2015 12:39:23 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.34; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.34 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <231f7ed9-3c99-4280-97d7-b60943ecb5ac@googlegroups.com> Subject: Re: Integer to String From: Anh Vo Injection-Date: Thu, 29 Jan 2015 20:39:23 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:192108 Date: 2015-01-29T12:39:23-08:00 List-Id: On Thursday, January 29, 2015 at 9:36:21 AM UTC-8, montgrimpulo wrote: > -- ... > New_Line(2);Put("num= ");Put(num); > (20) str:=Integer'Image(num); > New_Line;Put("str= ");Put(str); > end ItoS; (20) should not be here. Otherwise, syntax violation is resulted. It must be cut and paste error. > However, the outcome is : > num = 7 > char= The 7th character (BEL) is a controlled character. Thus, nothing is printed. > num= 123456 > > raised CONSTRAINT_ERROR : itos.adb:20 length check failed. Others have already explained this exception. Anh Vo