On Wed, 24 Jul 2024, Carlo Hogeveen wrote:
>
> Fred,
>
> > I got to wondering if there was a way to have the $10 used in a
> > static string in a macro without having the hex byte $10 in the macro's
> > .s file (or generated at run time).
>
>I think the compilable and working example below answers your
>question affirmatively.
Interesting, thanks Carlo. I looked at the binary of the .mac file
from that code and it does indeed look, if I understand it correctly, like
"Soup " + Chr(16)
gets compiled into a constant string.
I had taken the the help file verbage:
> menu menu_name()
>
> [ title = constant_string ]
to mean that the title had to be presented to the compiler
as a constant string ie a string in quotes.
Fred
> Carlo
>
>
> menu dinner()
> history
> "Soup", Warn('Tomato soup'), , 'Tomato soup'
> "Soup ", Warn('Gazpacho'), , 'Gazpacho'
> "Soup " + Chr(16), Warn('Onion soup'), , 'Onion soup'
> end dinner
>
> proc Main()
> repeat
> dinner()
> until not MenuOption()
> PurgeMacro(CurrMacroFilename())
> end Main
>
>
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
semware+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/semware/000201dadde9%24116ff7c0%24344fe740%24%40ecarlo.nl.