MACRO ERROR

MACRO ERROR

Postby Silvio.Falconi » Sat Sep 14, 2019 11:01 am

I'm converting an my old clipper application and I have a strange error on compilation

Code: Select all  Expand view
numeri:= 1
         do while (numeri <= 10)
            conta:= 1
            rmax:= 0
            do while (conta <= 90)
               num:= "N" + LTrim(Str(conta))
               if (Val(&num) >= rmax)
                  massimo:= SubStr(num, 2, 2)
                  rmax:= Val(&num)
               endif
               conta:= conta + 1
            enddo
            num:= "N" + LTrim(massimo)
            numeri:= numeri + 1
            @ riga, 1 + numeri  * 5 say massimo + " (" + &num + ")"    OF oAmbRitardo       SIZE 30,10
              &num:= "0"
         enddo


give me error at this line

@ riga, 1 + numeri * 5 say massimo + " (" + &num + ")" OF oAmbRitardo SIZE 30,10

errors
source\PAmbata.prg(176) Error E0047 Code block contains both macro and declared symbol references 'MASSIMO'
source\PAmbata.prg(176) Error E0047 Code block contains both macro and declared symbol references 'NUM'
source\PAmbata.prg(176) Error E0042 Macro of declared symbol '{|| massimo + " (" + &num + ")"}'
3 errors

why and How I can resolve ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: MACRO ERROR

Postby Silvio.Falconi » Sat Sep 14, 2019 11:11 am

I understood it not want the character " (" and ") "

but How I can write on videp sample ==> 100 (8) ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: MACRO ERROR

Postby ukoenig » Sat Sep 14, 2019 11:26 am

Silvio

just use the var-name
" (" + num + ")"

@ riga, 1 + numeri * 5 say massimo + " (" + &num + ")" OF oAmbRitardo SIZE 30,10

sample :

I := 1
FOR I := 1 TO 10
num := "N" + LTrim(str(I))
MsgAlert( "massimo (" + num + ")" )
NEXT

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: MACRO ERROR

Postby Silvio.Falconi » Sat Sep 14, 2019 11:48 am

num =============>N87
&num =============> 50

if I not insert & it not show the right number

because &Num is 50 but only num is N87
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: MACRO ERROR

Postby Silvio.Falconi » Sat Sep 14, 2019 11:55 am

for now I resolve erase the ( and ) and insert font bold
it is a mathematical calculation to find the major late numbers and the weeks (or contests) late in the lottery game in Italy

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests