[its-hackers] Example of moving atoms from one oblist to another in MUDDLE

rrs0 at earthlink.net rrs0 at earthlink.net
Tue Jan 26 19:20:41 CET 2021


Hi Lars and everyone,
Here's a MUDDLE interactive session show how to moving atom from one oblist to another without
dribbling atoms where their not wanted. This code is needed in the MUDDLE package's ENTRY function 
To place its argument atoms on the package's public oblist.

		Rick
................................................................................................
;"MOVING ATOM FROM AOBL TO BOBL"
                                              
<INSERT "A1" .AOBL>$  	;"PUT ATOMS ON OBLIST A"                  
A1!-A                                          
<INSERT "B1" .AOBL>$  	;"NOT THE INITIAL OBLIST"                        
B1!-A                                          
<INSERT "C1" .AOBL>$                           
C1!-A 
                                        
.AOBL$    				 ;"LIST CONTENTS OF OBLIST A"                                    
#OBLIST ![(C1!-A B1!-A A1!-A)!]                
.BOBL$ 					 ;"LIST CONTENTS OF OBLIST B"                                    
#OBLIST ![()!] 				 

 ;"MOVE ATOM OF PNAME ' 'A1' ' FROM OBLIST A TO OBLIST B"                         
<SET ATM <REMOVE "A1" .AOBL>>$                
A1!-#FALSE ()                                  
<PNAME .ATM>$                                  
"A1"                                           
<INSERT .ATM .BOBL>$                           
A1!-B                                 

;"LIST CONTENTS  OF OBLISTS A AND B"
.AOBL$    
#OBLIST ![(C1!-A B1!-A)!]                      
.BOBL$                                         
#OBLIST ![(A1!-B)!] 
..................................................................................................




More information about the its-hackers mailing list