Description


When a field is not available and you use it -> show error and not a warning in the compilation messageframe

Use Case


You have an entity X with field Y When you say YBC.X = \"abc\" Compiler should show an error because field YBC doesn\'t exists.

Importance



Type


Uniface Development Environment

Operating System


Not Applicable

Status


Open

5 thoughts on “IDF compiler”

  1. Unfortunately we have many customers with large applications that have been running for many years with warnings like these in them.

    Changing these warnings into errors would bring them to a stand still.

    A setting that allows you to say whether this is a warning or an error might be a possibility.  

  2. If the compiler points out that a variable does not exist, then any calculations involving that variable fail. This would bring a whole new meaning to my understanding of the word ‘running’ that I wasn’t previously aware of. A compatibility switch I can understand, but I have never understood why it would ever be sane to allow a program  which will not work because a variable has not been defined to compile. Neither variables nor fields which are missing can be ‘redefined’ at runtime, this code will always fail.

    1. Hi

      if you are talking about code into components, you are right.
      But what about code in globel objects (procs,  menu,. ..) ?
      There it is not clear, weather a variable is a variable or a field and if this variable exists.

      So if there is only one parser for all code, it could be not an error, but only a warning.

      On the other hand:

      Please UnifAce, extend your precompiler statements and variable declartion:

      #pragma strong_variable_check

       

       

      var

       

       

    2. istiller on May 15, 2014 at 10:10 am said:

      (sorry, the blog-editor is a little bit …)

      Hi

      if you are talking about code into components, you are right.
      But what about code in globel objects (procs,  menu,. ..) ?
      There it is not clear, weather a variable is a variable or a field and if this variable exists.

      So if there is only one parser for all code, it could be not an error, but only a warning.

      On the other hand:

      Please UnifAce, extend your precompiler statements and variable declartion:

      #pragma strong_variable_check

      variables
      field <fieldname> ; fieldname exists in a concret component, don’t show any warning/errors
      endvariables

      Ingo

Leave a Reply