comp.lang.ada
 help / color / mirror / Atom feed
From: Kevin Chadwick <kevc3no4@gmail.com>
Subject: Re: Empty String confusion; Positive and Natural
Date: Tue, 30 Nov 2021 05:12:29 -0800 (PST)	[thread overview]
Message-ID: <14ff2180-6e3b-40a0-bdab-1d812826f091n@googlegroups.com> (raw)
In-Reply-To: <so56to$1t8$1@dont-email.me>


> Since String is indexed by Positive (not Natural), the lower bound 
> cannot be 0. OTOH, there is no check for bounds of empty arrays, 
> therefore the following would work:
> type RunOutput(LogLen, OutputLen : Natural) is record
> LogStr : String(1..LogLen); 
> Output : String(1..OutputLen); 
> 
> and you can have empty strings if Loglen or Outputlen is 0, without 
> Constraint_Error. (It's precisely for that reason that there is no check 
> of bounds of empty arrays). 

I See, 
Thanks everyone

I apologise for posting the original thread whilst leaving the office and 
posting without the code upfront.

  reply	other threads:[~2021-11-30 13:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 17:34 Empty String confusion; Positive and Natural Kevin Chadwick
2021-11-29 18:05 ` Jeffrey R.Carter
2021-11-29 19:19 ` Niklas Holsti
2021-11-29 22:50   ` Kevin Chadwick
2021-11-30  8:29     ` Simon Wright
2021-11-30  8:34     ` Niklas Holsti
2021-11-30 10:00     ` Jeffrey R.Carter
2021-11-30 12:17       ` Kevin Chadwick
2021-11-30 12:54         ` J-P. Rosen
2021-11-30 13:12           ` Kevin Chadwick [this message]
2021-11-30  7:40 ` ldries46
2021-11-30  8:21   ` Simon Wright
2021-11-30 12:39     ` ldries46
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox