For a long time I have been using the CPC Basic to generate data & cie, and there are some things that are not very practical. But there are probably some tricks and facilities. I know that the Utopia ROM adds functionality (
we can read this for example).
Is there anything else? Calling a subroutine with an explicit name and not a line number, replacing the heavy "table=table+1" with something else, etc.
Do you think the alternatives in C language are better suited for this?
BASIC is kind of flawed to begin with!
There is a port of Forth on CPC which me be worth looking into. Pascal and C are other options!
BTW, Orgams's editor can be reused for any language.
Maybe DEF FN can help you?
It can be a kind of named subroutine returning a result.
Also to avoid table=table+1, you can write DEFN FN inc=table+1 at the beginning of your code, and after table=FNinc.
Not sure if it's really better...?
I always use BASIC to generate my datas, but when it's too slow I write some PHP scripts to do the job. It looks like C language, but not as fast. However it doesn't need to be compiled before running it.
Python is certainly be more friendly than PHP for scripting! Of course not available on CPC.
I think you will find C really tedious. What about Turbo Pascal? Certainly more readable.
(for my current project I use Kotlin to generate Z80 code, and it's AWESOME).
I always take care to choose a language for which the hello world program does not fit in a CPC ;)
I'm currently using rust in replace of python (mainly for code generation)