Historical forum-msg-id-135468-edit, Revision 1

Original date:2021-01-13 10:59:33 Edited by: petelomax Subject: Re: wikipedia draft

katsmeow said...

Ok, read. To address your concerns...

I am guessing, but i suspect the labels in OE are in quotes, being strings, to avoid the possibility of them being reserved names of anything.

Maybe, I was not planning on replicating Euphoria's label "string" and goto "string" syntax anyway.

katsmeow said...

However, and you are in a better position than me to test this, this feature prohibits the ability to goto the value of a variable.

words = {"apple","tree","cow"} 
goto words[1] 
:tree -- code for trees 
:apple -- code for apples 

Oh my, I wasn't planning on anything like that.

Why on earth would anyone in their right mind ever want anything remotely like that, he asks, hopefully rhetorically.

Given that Phix already supports

#ilASM{ jmp :meaningful_label } 
#ilASM{ ::meaningful_label } 
I was planning on the following (exact) syntax 
goto :meaningful_label 

And simply re-factoriung/re-using the existing code

goto should be resolved at compile-time.

If you think I was reluctant to add goto, imagine how reluctant I will be to cary forward a string lookup table and the associated address table into the runtime, along with error handling code and an almost guaranteed branch misprediction.

katsmeow said...

doesn't mean i'd prohibit back jumps.

I said recommend, not prohibit.

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu