Skip to main content
What's better? 🙂

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 🙂

Ingo

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

What's better? 🙂

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 🙂

Ingo

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

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


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

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


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

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


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

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