• programming: how to EQUate a semicolon ?

    From R.Wieser@21:1/5 to All on Mon Nov 25 09:13:22 2024
    XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32

    Hello all,

    Using Borlands Tasm32 v5.0 I've got the next code (example) :

    foo EQU call bar

    and use it like this:

    foo,1234

    Now I want to suppress the calling of "bar", and thought about just changing the "foo" equate with a semi-colon (imagine many calls to "bar" which
    disappear as a result of a single change). The end result would than look
    like this :

    foo EQU ;

    ;,1234

    (after being resolved)

    The problem is that I can't seem to find a way to EQUate a semicolon (as its regarded to be the start of a comment). :-(

    Does anyone know how its supposed to be done ?

    Remarks:

    Borlands Tasm32 doesn't have a pre-processor.

    I already found a solution using an empty macro, but would like to know if
    it can be done with an EQUate too (just like the other one. it looks better/cleaner to me).

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Tue Nov 26 08:51:46 2024
    XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32

    JJ,

    `EQU` is for defining a constant. It can't work like a macro.

    Whut? I didn't try to suggest that. I just mentioned a macro as a solution
    to my problem. You know, instead of

    foo EQU ;

    I used

    foo macro args:rest
    endm

    , which Works like a charm.

    In term of value/data, `;` is valid only as a character/string.
    So you're missing something.

    :-) Why did you think I posted this question ?

    I tried a number of methods. Including using TEXTEQU and putting the
    semicolon between "<" and ">" (which I imagined should work for EQUates as (double)quotes work for DB).

    Alas, the line was cut off (as shown in the .LST file) at the semi-colon
    every time. :-|

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Tue Nov 26 14:27:13 2024
    XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32

    On Mon, 25 Nov 2024 09:13:22 +0100, R.Wieser wrote:
    Hello all,

    Using Borlands Tasm32 v5.0 I've got the next code (example) :

    foo EQU call bar

    and use it like this:

    foo,1234

    Now I want to suppress the calling of "bar", and thought about just changing the "foo" equate with a semi-colon (imagine many calls to "bar" which disappear as a result of a single change). The end result would than look like this :

    foo EQU ;

    ;,1234

    (after being resolved)

    The problem is that I can't seem to find a way to EQUate a semicolon (as its regarded to be the start of a comment). :-(

    Does anyone know how its supposed to be done ?

    Remarks:

    Borlands Tasm32 doesn't have a pre-processor.

    I already found a solution using an empty macro, but would like to know if
    it can be done with an EQUate too (just like the other one. it looks better/cleaner to me).

    Regards,
    Rudy Wieser

    `EQU` is for defining a constant. It can't work like a macro.

    In term of value/data, `;` is valid only as a character/string. So you're missing something.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Dec 7 08:40:03 2024
    XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32

    The end result would than look like this :

    foo EQU ;

    ;,1234

    (after being resolved)

    The problem is that I can't seem to find a way to EQUate a semicolon (as
    its regarded to be the start of a comment). :-(

    I take it noone has an idea how to EQUate a semi-colon ?

    Bummer.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)