[Date Prev][Date Next][Subject Prev][Subject Next][Date Index][Subject Index]

Re: Question about "array" variables in XPL



Reply to note from wbass@xxxxxxxxxxxx Mon, 15 Jul 2024 05:12:52 +0000 (UTC)

Hello, Wally, good to hear from you!

> has there been any discussion here about ways to give us the kind
> of function that Herb does, but without the code growing in
> proportion to the number of Save/Gets that I want to support.

Yes, there is a way to do this succinctly: by using concatenation to construct the necessary XPL
code "on the fly". Robert Holmgren discovered and explained the procedure 34(!) years ago
in his seminal treatise on XyWrite control characters (CTRLCHAR.TXT, <https://ammaze.net/xywwweb/dls/CTRLCHAR.ZIP>).
In the attached SAVENNN.PM, I've tried to show how this method can be used to tersely replicate
Tyson's SAVE100.PM. (GET100.PM is left as an exercise.) My code should be more or less
self-explanatory if you're fluent in XPL (as I know you are), but it will be more easily
understandable if you read CTRLCHAR.TXT first.

I hope this helps. Let us know what you think.

--
Carl Distefano
cld@xxxxxxxxxx

Attachment: bin2ljED_V877.bin
Description: Binary data