Macro definition ERROR

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3364
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Macro definition ERROR

Post by serge_girard »

Hello,

I need to call a site with 2 parameters

Code: Select all


zzz (123456)

function zzz(CY)
LOCAL cCY, cURL
cCY   := '&CY=' + CY
cURL  := 'https://www.somesite.com/some.php?tp=er' + cCY   
EG: https://www.somesite.com/some.php?tp=er&CY=123456

This gives this eror:

Code: Select all

Error E0042 Macro of declared symbol '&CY'
 
I solved this error before but memory doesn't serve too well, now...

Anybody?

Serge
There's nothing you can do that can't be done...
User avatar
gfilatov
Posts: 1101
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Macro definition ERROR

Post by gfilatov »

Hi Serge,

Try to add the following string on top of your prg-module:

Code: Select all

#pragma -km+ 
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
serge_girard
Posts: 3364
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Macro definition ERROR

Post by serge_girard »

Thanks Grigory,

Just found out what was wrong:

It must be:

Code: Select all


zzz (123456)

function zzz(CYx)  // this CY caused error
LOCAL cCY, cURL

cCY   := '&CY=' + CYx
cURL  := 'https://www.somesite.com/some.php?tp=er' + cCY   
Serge
There's nothing you can do that can't be done...
Post Reply