` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Templates: Comparing two file structures
1998-10-23 -- Mike Hanson
 
Newsgroups: topspeed.products.c4 This should do the trick: #!----- #TEMPLATE(MyTpl,'My Templates'),FAMILY('ABC') #!----- #EXTENSION(EnsureDupFiles,'Ensure Dup Files'),APPLICATION,MULTI #PROMPT('File 1:',FILE),%File1,REQ #PROMPT('File 2:',FILE),%File2,REQ #VALIDATE(%File1<>%File2,'These cannot be the same!') #!----- #ATSTART #DECLARE(%MyKeyStruct),MULTI #DECLARE(%MyFieldStruct),MULTI #PURGE(%MyKeyStruct) #PURGE(%MyFieldStruct) #FIX(%File,%File1) #FOR(%Key) #ADD(%MyKeyStruct,%KeyStruct) #ENDFOR #FOR(%Field) #ADD(%MyFieldStruct,%FieldStruct) #ENDFOR #FIX(%File,%File2) #IF(ITEMS(%Key)<>ITEMS(%MyKeyStruct)) #INSERT(%NoMatch) #ENDIF #IF(ITEMS(%Field)<>ITEMS(%MyFieldStruct)) #INSERT(%NoMatch) #ENDIF #FOR(%Key) #SELECT(%MyKeyStruct,INSTANCE(%Key)) #IF(%KeyStruct<>%MyKeyStruct) #INSERT(%NoMatch) #ENDIF #ENDFOR #FOR(%Field) #SELECT(%MyFieldStruct,INSTANCE(%Field)) #IF(%FieldStruct<>%MyFieldStruct) #INSERT(%NoMatch) #ENDIF #ENDFOR #ENDAT #!----- #GROUP(%NoMatch) #ERROR(%File1 &' and '& %File2 &' do not match!') #!----- Catch you later! -=> Mike Hanson <=- www.BoxsoftDevelopment.com Chris Moore wrote: >Is it possible for a Template (global) to compare the structure (field >labels, types & sizes) between 2 files? I would like to have a Global >template that could do this everytime I compiled my DATA.DLL for my >system. (I must keep 2 files identical - except for the file name). > >Thanks > >Chris


Today is November 21, 2024, 7:08 am
This article has been viewed 35308 times.
Google search has resulted in 31 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: