catseye / Funge-98

MIRROR of https://codeberg.org/catseye/Funge-98 : The Funge-98 specification in all its gory
https://catseye.tc/node/Funge-98
32 stars 2 forks source link

[Observation] HRTI 'E' has undefined behaviour when mark is not present #13

Open FalsePattern opened 2 years ago

FalsePattern commented 2 years ago

The E 'Erase mark' operation removes an already existing timer mark with the current IP's ID.

However, it is not defined whether it should reflect, or behave as no-op when such a mark was not created already using M beforehand.

In my subjective opinion, no-op fallthrough makes the most sense given that the end result would be the same in both cases (T reflecting), however, E reflecting with an empty mark would have a higher consistency with the behaviour of other instructions that reflect on failure.

The safest way to go about using HRTI in this case would be to make sure that E is never called before M (or twice after M), or by having a reflection-ignoring construct around E (for instance: 3j>z#E when entering at the 3 with a delta to the right).

(this issue is just a minor observation for anyone who is looking to use this specific fingerprint in their code and not a request for clarification)