Skip to main content

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
------------------------------

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
------------------------------

This works Fine.



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

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
------------------------------

I´m using patch 019



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

This works Fine.



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

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
------------------------------