Robert Cemper · Jul 19, 2020 1m read

Organize %ZLANG**

The guide “Extending Languages with %ZLANG Routines” tells you all details you need to know
to extend your actual programming language.

Adding command by command it can become a long and un-handy routine. 
How to do it in a clean way?<--break->
For longer sequences, you can outplace the code into another class or a routine.
But this might not be effective for midsized code segments.
In addition, the call creates an additional stack level and that's not for free.

An alternate (traditional) approach is : 
Instead of adding line by line commands and it's code
you isolate each command and its code into a separate INClude file.

So what is left is just 1 single line by command and a list of activated extensions.

This example of a %ZLANGC00.mac may show a possible approach

In case you just use a few extensions you can skip this.
But I have seen extensions of several hundred lines where you get lost 
even if your screen is in portrait mode.

I prefer this compact view.

BTW: #include can do more than just host #define, .. for $$$_references


0 221
Discussion (0)0
Log in or sign up to continue