As an example, suppose we are trying to write the code called 'periodic table' where we will select configurations (one or many)for specific ion and somehow further process it. For example first 4 elements from Hydrogen to Beryllium have these well known configurations
config(1,1)='1s1'
config(1,2)='1s1' config(2,2)='1s2'
config(1,3)='1s1' config(2,3)='1s2' config(3,3)='1s2_2s1'
config(1,4)='1s1' config(2,4)='1s2' config(3,4)='1s2_2s1' config(4,4)='1s2_2s2'
It is possible to write short DO loop which will create many similar Clearwin controls for all elements of periodic table where we will be able to chose specific configurations of specific atom? It is obviously simpler to set the data for all atoms and then write just one single DO loop instead of painfully fill many lines manually.
Problem is that my several attempts of creating such loops (as below) failed. (Here i created just first 10 controls for the first 50 instead of 106 elements of periodic table)
do i=1,10 j=winio@(' Element %ta%ws%ta%8.2^ms%sf%ff&', element(i), config(:,i),intl(50), iz_Selected(:,i),cb_processRequest) enddo
The one-dimensional arrays where i just substituted 2D arrays with 1D arrays config--> config0 and iz_Selected --> iz_Selected0 are working OK. Here is the compilable demo code where first control in the picture shows how all should work (but how it should not be written for the whole set of 106 elements) with all others controls made by do loop which does not work (but how the code should in principle be written). Is there a way to get through this with some kind of derived type setup instead of 2D array to fool Clearwin ? Or i just have done something wrong somewhere?

integer cb_processRequest
external cb_processRequest
character*2 element(106)
data element/&
&'h ', 'he',&
&'li','be', 'b ','c ','n ','o ','f ','ne',&
&'na','mg', 'al','si','p ','s ','cl','ar',&
&'k ','ca','sc','ti','v ','cr','mn','fe','co','ni','cu','zn','ga','ge','as','se','br','kr',&
&'rb','sr','y ','zr','nb','mo','tc','ru','rh','pd','ag','cd','in','sn','sb','te','i ','xe',&
&'cs','ba','la','ce','pr','nd','pm','sm','eu','gd','tb','dy','ho','er','tm',&
& 'yb','lu','hf','ta','w ','re','os','ir','pt','au','hg','tl','pb','bi','po','at','rn',&
&'fr','ra','ac','th','pa','u ','np','pu','am','cm','bk','cf','es','fm','md','no','lw','rf','ha','??'/
character*32 config(50,106)
integer iz_Selected(50,106)
character*32 config0(50)
integer iz_Selected0(50)
config(1,1)='1s1'
config(1,2)='1s1'
config(2,2)='1s2'
config(1,3)='1s1'
config(2,3)='1s2'
config(3,3)='1s2_2s1'
config(1,4)='1s1'
config(2,4)='1s2'
config(3,4)='1s2_2s1'
config(4,4)='1s2_2s2'
config0(:)=config(:,4)
iz_Selected(:,:) = 0
iz_Selected0(:) = 0
! On beryllium as an example of using 1D array
i=4
j=winio@(' Element %ta%ws%ta%8.2^ms%ff %ff&', element(i), config0,intl(50), iz_Selected0, cb_processRequest)
! Use 2D array - this is how i'd like it to look like
do i=1,10
j=winio@(' Element %ta%ws%ta%8.2^ms%sf%ff&', element(i), config(:,i),intl(50), iz_Selected(:,i),cb_processRequest)
enddo
j=winio@('%ac[Esc]&','exit')
j=winio@('%cn%bt[Exit]')
end
integer function cb_processRequest()
cb_processRequest=1
end function
' [/img]
