1
0
-1
What's better? (smile)

v_FEM = $concat(v_FLD,".",v_ENT)
reset $procerror
$1 =$fieldinfo(v_FEM,"DATATYPE") 
if($procerror<0)
  ;  avail
else
  ;  not avail
endif

reset $procerror
$1 = $item(v_FLD,$selectlist(v_ENT))
if($procerror<0)
  ;  avail
else
  ;  not avail
endif

Or is then any book where all statements are listed with there CPU cycles (smile)

Ingo

PS: We have to fight against C# and it is not easy to explain where are the advantages of UnifAce

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      C# and Uniface are both 'compiled' into their own intermediate language - in other words, neither is compiled down to a assembly level (as what you'd get from using a c/c++ compiler).

      I see you're using $selectlist....  I'm not sure as to why you'd do that unless you're working with a table with loads of fields...  Of course, if that's the case, and you're not worried about the record being modified by others.... 

      In the old days, I created 'short' versions of large tables in the model with alternative names and only the fields I needed - and then mapped the alternative name(s) via the ASN to the correct database table...  Haven't done that for a while - but I presume it would still work....

      In your 1st example - wouldn't

      @v_fem

      give you the same result?

      Knut

      1. Ingo Stiller

        @v_fem is also possible but with drawback, that there are error message

      2. Ingo Stiller

        Okay c/c++ compiler are generating assembly but uses many, many libraries like STL.
        So at the end, also C++ use a "intermediate language"
        (smile)

      3. Knut Dybendahl

        I'd say that'd be a negative... those libraries are also compiled down to assembly code...

      CommentAdd your comment...