comp.lang.ada
 help / color / mirror / Atom feed
* Ceate a set (type?) of list of integers that varies at run time
@ 2018-01-26 23:58 Mace Ayres
  2018-01-27  7:20 ` Randy Brukardt
  2018-01-27 18:56 ` Jeffrey R. Carter
  0 siblings, 2 replies; 3+ messages in thread
From: Mace Ayres @ 2018-01-26 23:58 UTC (permalink / raw)


* Using the word set in mathetical sense.
I have an array 2D_array is Integer 1..9, 1..9 of my_record.  — my_record has a boolean field locked.
Before looping/iteration across 2D_array (r,c), I want to restrict the columns (c) that I process, to bet something  like
for r in 1..9 loop
 for c (column) in (columns_to_check)

I have to create the enumeration type? list of columns to check and put in my columns_to_check container
and then only iterate these, maybe 1,2,3,7,8,9 — do not check 4,5 or 6

Need a function like get_columns_to_check
that iterates all 1..9 columns 
if (r,c).locked is true 
then do not have in final columns_to_check something (range, or enumeration type)
either add to empty columns_to_check or delete from default columns_to_check that has 1..9;

what kind, type of an object can I use to hold the valid columns to check thing-e columns_to_check
and that I can also iterate across.

Can I have a range that is not a continuous series of integers, NOT 1..9 but 1,2,5,6,7,9 
and then some different subset of 1..9 the next time. Recalculating a new set Columns_to_check for each outer loop of rows?

 ...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-27 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 23:58 Ceate a set (type?) of list of integers that varies at run time Mace Ayres
2018-01-27  7:20 ` Randy Brukardt
2018-01-27 18:56 ` Jeffrey R. Carter

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