Hacker News new | past | comments | ask | show | jobs | submit login

You can do that (or worse) in C too.

#define LABEL1 LABEL2

Is there any language that can be worse than a macro and #ifdef-ridden C? I'm only half joking.




Your C #define is done at compile time. This Cobol's alter example [1] seem to do so at runtime. Thus labels can be considered modifiable points. Actually, it's kinda interesting... does it support chains? Alter A->B and B->C, does GoTo A call C? If i now alter X->A then A->D and GoTo X, where do you end up? C? D? Hope you can at least undo that with something like alter A->A. Actually, I probably don't even want to know. Hope using it gives a big warning in whatever tools Cobal devs use.

[1] https://riptutorial.com/cobol/example/19820/a-contrived-exam...


#define's are a compile time construct though. I think the parent is describing a statement that alters the runtime location of a label.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: