----------------------------------------------------------------------------------
@MSGID:
<a6c6b161-ef3a-4594-9378-4f12c6004972n@googlegroups.com> a8664670
@REPLY:
<4fa2d9e6-2a30-4e24-87f4-d845c2a29cf1n@googlegroups.com> a51ed1c4
@REPLYADDR George Phillips <gp2k00@gmail.com>
@REPLYTO 2:5075/128 George Phillips
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<dfb449e3-9f90-421c-afa5-692e0cafab09@googlegroups.com> <7642c366-22bd-4075-8a42-601a2e99d263@googlegroups.com>
<TIadnY_OVusf-LrPnZ2dnUVZ_qqdnZ2d@giganews.com> <8d0b975a-eae8-4187-be3e-1d88bf074728@googlegroups.com>
1@dont-email.me> <1f077254-e679-47b0-ab6e-8d40006ade2e@googlegroups.com>
1@dont-email.me> 1@dont-email.me>
<0fa27cfa-8d62-4b58-b09c-ed67dd791c81@googlegroups.com> 1@dont-email.me>
<c678e9ff-91eb-4222-b8c0-3d2072185cbf@googlegroups.com> <9cc0e84f-ab30-45b4-9402-0f963b2a2b22@googlegroups.com>
<4fa2d9e6-2a30-4e24-87f4-d845c2a29cf1n@googlegroups.com>
@RFC-Message-ID:
<a6c6b161-ef3a-4594-9378-4f12c6004972n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
On Thursday, September 7, 2023 at 8:25:30 PM UTC-7, Jonathan Harston wrote:
> Is there a way to use strings in expressions in ZMAC, so I can do
> the following more efficiently:
Maybe it would be enough to just do the month as a macro?
VersMM macro
defm `Mar`
endm
DEFM `0`+(VersDD/10),`0`+(VersDD MOD 10),`-`
VersMM
DEFM `-`
Or use irp to do the month number to name lookup in a cleaner fashion:
VersMM equ 7
m1=0
irp s1,
if VersMM == m1
defm `&s1`
endif
m1++
endm
For the year you can stringify it doing something like this:
VersYY equ 2000
str macro sx
defm `&sx`
endm
str %VersYY
Though I guess the answer to your question is that zmac doesn`t
have string variables and you need to use macros to get the same kind
of manipulation.
--- G2/1.0
* Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5075/128
@PATH: 5075/128 5020/1042 4441