Hoc (programming language)

hoc, an acronym for High Order Calculator, is an interpreted programming language that was used in the 1984 book The Unix Programming Environment to demonstrate how to build interpreters using Yacc. hoc was developed by Brian Kernighan and Rob Pike as a glorified interactive calculator. Its basic functionality is to evaluate floating-point numerical expressions, e.g., "1+2*sin(0.7)". Then, variables were added, conditionals, loops, user-defined functions, simple IO, and more, using a syntax resembling C.

Hoc (programming language)

hoc, an acronym for High Order Calculator, is an interpreted programming language that was used in the 1984 book The Unix Programming Environment to demonstrate how to build interpreters using Yacc. hoc was developed by Brian Kernighan and Rob Pike as a glorified interactive calculator. Its basic functionality is to evaluate floating-point numerical expressions, e.g., "1+2*sin(0.7)". Then, variables were added, conditionals, loops, user-defined functions, simple IO, and more, using a syntax resembling C.