comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Re: Some problems with iterators
Date: Thu, 21 Aug 2014 19:34:28 +0300
Date: 2014-08-21T19:34:28+03:00	[thread overview]
Message-ID: <lt572h$37m$1@speranza.aioe.org> (raw)
In-Reply-To: fef16ffd-7510-460e-a471-2474b713830e@googlegroups.com

Egil H H wrote:
> On Wednesday, August 20, 2014 6:48:53 PM UTC+2, Victor Porton wrote:
>> Why Ada2012 does allow only type name for an iterator in for loops,
> 
> Please provide an example, or better yet, an RM reference, I can't find
> any for-loop that takes a type name for an iterator.
> 
>> not an iterator object?
> 
> But we can, RM 5.5.2(2/3).

It seems my misreading of RM:

"For the first form of iterator_specification, called a generalized 
iterator, the expected type for the iterator_name is any iterator type."

I understood this as need to supply an iterator type as iterator_name, not a 
value of this type. It seems my misunderstanding.

>> The following does not verify with GCC 4.9.1 (I think it is a compiler
>> bug and have reported this bug in GCC Bugzilla):
> 
> What error do you get?

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62205

test.ads:19:28: Default Iterator must be a primitive of "Descriptions_List"

Also, it seems that GCC 4.9.1 does not support "for ... in ... loop" syntax.

-- 
Victor Porton - http://portonvictor.org

  reply	other threads:[~2014-08-21 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 16:48 Some problems with iterators Victor Porton
2014-08-21  7:06 ` Egil H H
2014-08-21 16:34   ` Victor Porton [this message]
2014-08-21 16:46     ` Victor Porton
2014-08-21 23:01       ` Randy Brukardt
2014-08-22  7:59         ` Egil H H
replies disabled

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