<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


} Search:

In Local Variable Words in Local Variables Library

Word Name: }
Type: Immediate word
Data Stack Signature: --
Return Stack Signature: --
Availability: V1.2
Description:

Ends the declaration of a list of local variables.

Example:

: TEST ( age -- age+10 )
  LOCALS{ age } \ declare age a local variable
  SET age \ set local variable from the value on the stack
  10 +SET age \ add 10 to the value stored in age
  age \ leave age+10 on the stack
;

Comment:

A list of local variables within a colon definition is declared with LOCALS{ and ended with the word }. There must be at least one space character between the last local variable and }.

See Also: LOCALS{ 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>