Hello,
Here an error generated recently (was working before ) And that i don't understand.
Uasm et jwasm don't generate the error before ,what it mean ?
Do you seriously expect help with so little information? No code??
Hopefully, IFDEF had been much cooperative.
A macro in a SDWORD was suspect,and IFDEF had give me the answer.
Soluce,put the compteif SDWORD in comment ,used IFDEF and see if it is already defined.
The word compteif was in used elsewhere and after changed it,I have the time to search were he had been redefined.
It can be implemented but from user uses can lead to inconclusive results.
My 1ยบ choice is defense redefinition. suppose
earcdef TEXTEQU <eax>
earcdef_def equ 1
ifndef earcdef
earcdef TEXTEQU <edx>
earcdef_def equ 1
endif
;;or/and
ifnb earcdef
ifdifi earcdef <earcdef >, <edx>
earcdef TEXTEQU <edx>
if earcdef_def ge 1
% echo <"earcdef redefined" "File:" @FileCur "Line:" @Line>
endif
endif
endif
Quote from: TouEnMasm on August 20, 2020, 04:33:15 AM
Hopefully, IFDEF had been much cooperative.
A macro in a SDWORD was suspect,and IFDEF had give me the answer.
Soluce,put the compteif SDWORD in comment ,used IFDEF and see if it is already defined.
The word compteif was in used elsewhere and after changed it,I have the time to search were he had been redefined.
Perhaps this need more explain
useless:
Quote
ifndef earcdef
earcdef TEXTEQU <edx>
earcdef_def equ 1
endif
earcdef is defined
and
Quote
texte.asm(79) : Error A2039: Expecting comma: <earcdef >, <edx>
ifnb earcdef ------------ is true
ifdifi earcdef <earcdef >, <edx> ;------------ syntax error
earcdef TEXTEQU <edx> ;redefine earcdef
if earcdef_def ge 1 ;is always TRUE = 1
earcdef TEXTEQU <eax>
earcdef_def equ 1
;this is equal of above but defend for mutual inclusion with includes files, if found earlier don't define'it here.
ifndef earcdef
earcdef TEXTEQU <edx>
earcdef_def equ 1
endif
;;or/and
ifnb earcdef ;suppose isn't defined or as something; uasm ill trow error symbol not defined, and at same time we want to change'it but no idea if we define'it earlier
ifdifi earcdef, <edx> ;not equal wath i want define here and now
earcdef TEXTEQU <edx>
if earcdef_def ge 1 ;found defined earlier trow warning
% echo <"earcdef redefined" "File:" @FileCur "Line:" @Line>
endif
Quote from: TouEnMasm on August 20, 2020, 03:16:56 PM
Perhaps this need more explain
useless:
Quote
ifndef earcdef
earcdef TEXTEQU <edx>
earcdef_def equ 1
endif
earcdef is defined
and
Quote
texte.asm(79) : Error A2039: Expecting comma: <earcdef >, <edx>
ifnb earcdef ------------ is true
ifdifi earcdef <earcdef >, <edx> ;------------ syntax error
earcdef TEXTEQU <edx> ;redefine earcdef
if earcdef_def ge 1 ;is always TRUE = 1