# loaddefs link d_QNial_mine 'MindCode/code test/stdInOutTrig develop.txt' # www.BillHowell.ca 28Mar2020 initial # view this file in a text editor, with [constant width font, tab = 3 spaces] # /home/bill/PROJECTS/Qnial/MY_NDFS/MindCode/code develop/stdInOutTrig develop.txt #] #]******************************************************* #] link d_QNial_mine 'MindCode/code test/stdInOutTrig develop.txt' # List of operators, see : # $ echo "$d_txted" "'""$d_Qndfs""MindCode/5_MindCode global variable explanations.txt""'" | xargs -0 sh -c & write 'loading : *** stdInOutTrig' #] stdInOutTrig IS - build stdOutL list of (each net [input, output, trigPat] connections) # 22Mar2020 need to adapt this to arbitrary subNets! # 23Mar2020 this is very inefficient! # there are >=1 stdInNmIDL@stdID in general ; # 24Mar2020 it might be faster for small networks to simply sublist on [stdNameL, stdSubIDL] directly ; IF flag_break THEN BREAK ; ENDIF ; stdInOutTrig IS { LOCAL i stdID IDstdIDs inNet inNmID selection ; NONLOCAL stdIDL stdNameL stdSubIDL stdInNmIDL stdInL stdOutL trigPatNmIDL trigPatL ; % ; % build [stdNameL, stdSubIDL] cross-reference ; stdNmXrefL := cull sortup stdNameL ; stdXref_rows := gage shape stdNmXrefL ; stdIDXrefL := stdXref_rows reshape null ; stdNetIDXrefL := stdIDXrefL ; FOR i WITH (tell stdXref_rows) DO selection := stdNmXrefL@i EACHRIGHT = stdNameL ; stdIDXrefL@i := selection sublist stdSubIDL ; stdNetIDXrefL@i := selection sublist stdIDL ; ENDFOR ; % ; % build stdInL ; FOR stdID WITH stdIDL DO IF (~= null stdInNmIDL@stdID) THEN FOR inNmID WITH stdInNmIDL@stdID DO stdInL@stdID := link stdInL@stdID (nmID_to_stdID inNmID) ; ENDFOR ; ENDIF ; ENDFOR ; % ; % build stdOutL ; FOR stdID WITH stdIDL DO IF (~= null stdIDL@stdID) THEN FOR inNet WITH stdInL@stdID DO stdOutL@inNet := link stdOutL@inNet stdID ; ENDFOR ; ENDIF ; ENDFOR ; % ; % build trigPatL ; FOR stdID WITH stdIDL DO IF (~= null trigPatNmIDL@stdID) THEN FOR inNmID WITH trigPatNmIDL@stdID DO trigPatL@stdID := link trigPatL@stdID (nmID_to_stdID inNmID) ; ENDFOR ; ENDIF ; ENDFOR ; } # tests # enddoc