Thanks Alan and Gyle.  My original post was at around 10am this morning (Sunday), 
according to my log, so not too early ;o)

I will try using the FILEINFO() function.

Neil.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Alan Campbell
Sent: 25 April 2004 17:08
To: U2 Users Discussion List
Subject: RE: How to check if a variable is a filevar


Neil, Anyone who posts a question so ealry on a sunday (even with the time zone 
difference) deserves an answer.
I don't have access to a system right now, but what about FILEINFO? It should return 
meaningful data for a file variable, and probably nothing for a non-file pointer. You 
could check that.
 
HTH,
Alan

        -----Original Message----- 
        From: Neil Charrington [mailto:[EMAIL PROTECTED] 
        Sent: Sun 25/04/2004 5:07 AM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: How to check if a variable is a filevar
        
        


        Hi,
        
        Is there a way of checking to see if a variable is an opened file variable?
        I can check if it is alpha, numeric, assigned and unassigned but I cannot
        find anywhere where I can determine a filevar type.
        
        My  problem is that a routine is sent an Array to be saved to a file but the
        contents of that array are not known therefore I have to first convert any
        AM's in each array element (for the MATWRITE/MATREAD to work) but I have now
        come across a filevar in one of the elements - actually in 8 of them.
        
        Before anyone starts making comments like:  "just don't allow it..." or
        "what "idiot" programs that way anyway..." etc.. I had better explain what I
        am doing and why I have the problem.
        
        I am converting System Builder and SB+ apps to mv4GL and one of the
        functions is to save the user's available common area to disk and restore
        them.  Unfortunately the common variables can be used for any purpose and
        although there are specific variables designed for opening files, this
        particular app has opened them to a general PARAMS variable.  In this latest
        conversion, so far every part of SB+ (except security) is converted 100% and
        the run-time executes 99.99% of the converted app - the only problem I have
        come across during my testing is this one.
        
        Sorry, this is sounding as though it is becoming an AD.  Not my intention.
        
        Thanks for your help.
        
        Regards,
        
        Neil.
        --
        Neil Charrington
        C.A. Software Systems
        www.casoftware.co.uk
        www.mv4gl.com
        
        
        
        ----------------------------------------------------------------------------
        ----------
        FIGHT BACK AGAINST SPAM!
        Download Spam Inspector, the Award Winning Anti-Spam Filter
        http://mail.giantcompany.com
        
        
        ---
        Outgoing mail is certified Virus Free.
        Checked by AVG anti-virus system (http://www.grisoft.com).
        Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004
        
        
        --
        u2-users mailing list
        [EMAIL PROTECTED]
        http://www.oliver.com/mailman/listinfo/u2-users
        


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004
 


--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to