Results 1 to 3 of 3

Thread: Strange Problem?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Cumming, Georgia USA
    Posts
    1,891

    Default Strange Problem?

    This may be well known, but for me it was a shock! If a "File" is not open and you use "Clear File", thereafter you can reference the File column names without generating a compiler error!! This allows the program to run without the file being open!! Is this something I should have known after 40 years or is this a compiler problem?

  2. #2
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,321

    Default Re: Strange Problem?

    normal. you can also use

    Declare_DataFile CUST

    to declare a file without opening which is what CLEAR file actually does.

    programs do not execute in procedural manner so the compiler couldnt know if at a certain point a file will be open
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  3. #3
    Join Date
    Mar 2009
    Location
    Cumming, Georgia USA
    Posts
    1,891

    Default Re: Strange Problem?

    Seems to me that if you want to use the file before opening, for the compiler, use Delcare_DataFile as you suggest. If not, the compiler should error if you use "Clear" without the file being opened. Just my thoughts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •