[infix
Infix notation

Next:INFIX::


Vocabulary
infix

Syntax
[infix ... infix]


Word description
Parses the infix code inside the brackets, converts it to stack code and executes it.

Examples
USING: infix prettyprint ; IN: scratchpad [infix 8+2*3 infix] .
14


[infix isn't that useful by itself, as it can only access literal numbers and no variables. It is designed to be used together with locals; for example with :: :
USING: infix locals math.functions prettyprint ; IN: scratchpad :: quadratic-equation ( a b c -- z- z+ ) [infix (-b-sqrt(b*b-4*a*c)) / (2*a) infix] [infix (-b+sqrt(b*b-4*a*c)) / (2*a) infix] ; 1 0 -1 quadratic-equation . .
1.0 -1.0


Definition