FRM

From Esolang
Jump to navigation Jump to search

FRM, or Forced Runtime Manipulation is a language that requires runtime manipulation. Each line must be executed in its original state, and then after being manipulated.

Code examples

<T>anyvar="something";   //Declare a new variable
%-1 <T> -> string;              //% means replace, in this case <T> is replaced with string. The number after % is the line.
%-2 "something" -> "Hello, World!";
@execute    //After % (or after a row of %) an execute has to follow, which calls the last line not starting with %
<T>novar="";
%-1 <T> -> string;
%-2 "" -> ".";   //We need to declare novar, else we can not push it to the stack.
@execute
push novar;  //Push
%-1 push -> pop;
%-2 novar -> anyvar;
%-3 pop -> print;  //just for demonstration
@execute
thisisaline="line";  //if no type is specified, it MUST be a string
%-1 this -> string ;
%-2 isaline -> line; 
@execute
%-4 line -> line2;
@execute
//This would create three (thisisaline,line and line2) variables with same value.

Interpreters should look for things like this...

int x=5;
%-1 x -> dummy;
%-2 dummy -> x; 
@execute

... and should not allow such manipulations.