boeckmann / asm6502

Small but useful 6502 assembler in ~3K lines of ANSI C code.
MIT License
5 stars 2 forks source link

Implement unary is-defined operator ?, prohibit undefined .IF argument, remove .IFDEF #28

Closed boeckmann closed 1 year ago

boeckmann commented 1 year ago

At the moment ? is used to return an undefined value. But the following usage seems to be more convinient:

.IF ?VICE
.ENDIF

Testing for undefined value should be much more common than expressing an undefined value. Undefined value will become .?.

Undefined arguments to .IF can be prohibited. .IFDEF is redundant and can be removed. Both not decided yet.

boeckmann commented 1 year ago

? and .? are implemented by dd2eda9. Regarding .IF and .IFDEF, a final decision is not made yet.

waltje commented 1 year ago

Problem is, most developers are used to working with if/ifn/ifdef/ifndef, and only a few use the more esoteric ? operators, even more so if those developers are also using C or C++ ..

I am not going to do this, unless I get specific requests for it.

On Wednesday, April 26, 2023 at 03:56:39 AM EDT, Bernd Böckmann @.***> wrote:

At the moment ? is used to return an undefined value. But the following usage seems to be more convinient: .IF ?VICE .ENDIF

.IFDEF is then redundant and could get removed. The undefined value becomes .?.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

boeckmann commented 1 year ago

leave .ifdef, .ifndef in for now.