News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

compteif SDWORD 0 : Macro nesting level too deep

Started by TouEnMasm, August 20, 2020, 02:57:12 AM

Previous topic - Next topic

TouEnMasm

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 ?
Fa is a musical note to play with CL

jj2007

Do you seriously expect help with so little information? No code??

TouEnMasm


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.
Fa is a musical note to play with CL

KradMoonRa

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.
The uasmlib

TouEnMasm

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
Fa is a musical note to play with CL

KradMoonRa


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