1
0
-1

Hi Freaks

Did you know, that there is a function $currhits() (smile)

Not only it's highlighted in the editor but it does its job ...

Ingo


    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Ingo has written $currhits() with 2 r chars while Iain reported $curhits with a single r char.

      Quick check:
      Searching into actual CHM file I am finding only $curhits (single r char);
      writing $currhits (with 2 r chars) in a trigger is highlighted, compiled and it works like $curhits.

      Gianni

      1. Iain Sharp

        Yeah, but as Ingo says, if you type $currhits into the editor, it colours up as blue (meaning recognised as a reserved word). I was just curious which of the other two it behaved like. 

      2. Daniel Iseli

        $currhits is just a synonym of $curhits. The compiler and runtime treat the two functions exactly the same. I guess it was a choice to just document $curhits - did not really check what was implemented first.

      3. Gianni Sandigliano

        The first implementation I remember (4.0.q6) was $currhits with 2 r chars.

        Gianni

      CommentAdd your comment...
    2.  
      1
      0
      -1

      In Uniface Six, the implemented $curr.... violates the standard $cur... naming convention.
      So it was corrected in Uniface 7.
      but for compatibility reasons, the parser handles $currhits as well up to today.


      README File for UNIFACE Six Version 6.1.dp : CDROM Distribution

      (C) Copyright Compuware Corporation, 1997

      Uniface Six Functions

      Entity:

      $curocc E Return the sequence number of the current occurrence in the hitlist.
      $currhits E Return the number of occurrences currently in the hitlist.

      Field:

      $curline E Return the line on which the cursor is positioned in the current field.
      $curword E Return the word on which the cursor is positioned in the current field.


      Uniface 7.2.04

      Proc Language Reference Manual, Volume 2 (Feb 1999) 14-43

      1. The name $currhits is a synonym for $curhits.



        CommentAdd your comment...
      1.  
        1
        0
        -1

        So, is "It's job" the same as $curhits, or $hits? 

        Iain

          CommentAdd your comment...