<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In Local Variable Words in Local Variables Library
Pops the top of the stack, and adds the value obtained to the current value of the local variable.
: TEST ( n1 -- n2 ) LOCALS{ n2 } SET n2 \ load local variable n2 with n1 (from top of data stack) n2 +SET n2 \ double the value stored in n2 n2 \ leave n2 on the stack ;
The name of the local variable must follow the word +SET.
+SET