Uniface User Forum

 View Only
  • 1.  Pre processor not longer "pre" ?

    Posted 06-10-2024 08:04

    Hi Freaks

    In Uniface 9 I generate prcedures at compile time by preprocessor directives.
    That's wonderful if you need the same algorithm for similar things. See also Templates in C++
    But in Uniface 10 I got an error
    (279\OSCR)                ENTRY LF_<CC_RL>_AND2
    (279\OSCR)    error:   1000 - Syntax error (Statement not valid)

    Any idea what's going on here and how to solve?

    Ingo

    Here is the beginnig of such block

    #for c_CCX1=(R,L)


     #if ('<c_CCX1>'='R')
      #define c_CCX2=RX,RR,RM,RW,RD
     #else
      #define c_CCX2=LX,LR,LM,LW,LD
     #endif


    ENTRY LF_<c_CCX1>_MRG
      returns string
      params
        string v_INFO_THIS :IN
        string v_INFO_MRG  :IN
      endparams
      variables
        boolean v_B1
      endvariables
     #for c_CCX3=(<c_CCX2>)
      getitem/id v_B1,v_INFO_MRG,"<c_CCX3>"
      IF(v_B1!="")
        putitem/id v_INFO_THIS,"<c_CCX3>",v_B1
        putitem/id v_INFO_THIS,"<c_CCX3>F",$item("<c_CCX3>F",v_INFO_MRG)
      ENDIF
     #endfor
     #undefine c_CCX3
      $status = 0
      RETURN(v_INFO_THIS)
    END ; LF_<C_CCX1

    ENTRY LF_<CC_RL>_AND2
      params
        string v_INFO1     :IN
        string v_INFO2     :IN
      endparams
      variables
        boolean v_B1,v_B2,v_B3
        string  v_W1,v_W2,v_W3
      endvariables

    ;...

    RETURN

    ;...

    #endfor



    ------------------------------
    Ingo Stiller
    Aareon Deutschland GmbH
    ------------------------------


  • 2.  RE: Pre processor not longer "pre" ?

    Posted 06-10-2024 12:54

    This works Fine.



    ------------------------------
    Juliano Anoar Haoach Garcia
    Suport Analyst
    Coamo Agroindustrial Cooperativa
    Campo Mourão BR
    ------------------------------



  • 3.  RE: Pre processor not longer "pre" ?

    Posted 06-11-2024 03:28

    Hi Juliano

    I got the cause :-)
    Was my fault, something is going wrong when moving the component from UnifAce 9 to Uniface 10 and so some #defines are missing :-)

    ThanX anyway
    Ingo



    ------------------------------
    Ingo Stiller
    Aareon Deutschland GmbH
    ------------------------------



  • 4.  RE: Pre processor not longer "pre" ?

    Posted 06-10-2024 12:54

    I´m using patch 019



    ------------------------------
    Juliano Anoar Haoach Garcia
    Suport Analyst
    Coamo Agroindustrial Cooperativa
    Campo Mourão BR
    ------------------------------