List Info

Thread: Re: BR 1582430: Allow numbers with leading + or - for %ifnum




Re: BR 1582430: Allow numbers with leading + or - for %ifnum
user name
2008-02-16 18:44:56
> It sounds like your use case really wants a %iftoken,
something that can
> tell you if something is a single pasteable token or
not.

Hehe, funny that you mention that -- I did add %IFTOK0
and %IFTOK1 in NASM64: check for exactly zero or one
tokens.  

But back to %IFNUM.

Don't get me wrong -- there are times when accepting a
sign as part of a number is the desired behavior. But the
only one who can tell, is the user.

I kinda hate to suggest it... but perhaps this one of those
few times were a user-selectable option is needed?

I already had to deal with that for two things in NASM64:
expand certain tokens before/after listing them, as well
as looking up context-local definitions in outer contexts.
As a result, I added %OPTION [-|+]EXPAND, as well as
%OPTION [-|+]LOOKUP -- perhaps %IFNUM requires a
new %OPTION [-|+]SIGNED or such...?

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

Re: BR 1582430: Allow numbers with leading + or - for %ifnum
user name
2008-02-16 18:49:06
anonymous coward wrote:
> 
> Hehe, funny that you mention that -- I did add %IFTOK0
> and %IFTOK1 in NASM64: check for exactly zero or one
> tokens.  
> 
> But back to %IFNUM.
> 
> Don't get me wrong -- there are times when accepting a
> sign as part of a number is the desired behavior. But
the
> only one who can tell, is the user.
> 
> I kinda hate to suggest it... but perhaps this one of
those
> few times were a user-selectable option is needed?
> 
> I already had to deal with that for two things in
NASM64:
> expand certain tokens before/after listing them, as
well
> as looking up context-local definitions in outer
contexts.
> As a result, I added %OPTION [-|+]EXPAND, as well as
> %OPTION [-|+]LOOKUP -- perhaps %IFNUM requires a
> new %OPTION [-|+]SIGNED or such...?
> 

I think the combination of %iftoken and %ifnum should be
able to do what 
anyone needs.  I'd be open to adding %ifempty as well.

	-hpa

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )