LocalazyLocalazy
FOCAL is a programming language created in the early 1970s by John G. Kemeny and Thomas E. Kurtz. It is a structured, imperative language with a simple syntax. It was designed to be easy to learn and use, and to be suitable for writing short programs. FOCAL programs are written in a text editor, and are executed by a FOCAL interpreter. The interpreter can be run in interactive mode, where it reads and executes commands as they are typed, or in batch mode, where it reads and executes a list of commands from a file. FOCAL is a case-insensitive language. That is, variable names and keywords can be written in upper case, lower case, or mixed case, and the interpreter will treat them all the same. FOCAL has a small set of built-in data types: integers, real numbers, strings, and Booleans. It also has a set of built-in functions for operating on these data types. Variables in FOCAL are untyped. That is, a variable can hold any type of data. This makes FOCAL a dynamically typed language. FOCAL has a simple control flow model. Programs are made up of a sequence of commands, which are executed one after the other. If a command is followed by an IF statement, then the command is only executed if the condition in the IF statement is true. If a command is followed by an ELSE statement, then the command is only executed if the condition in the IF statement is false. FOCAL has a small set of built-in commands for input and output. It also has a set of built-in functions for mathematical and string operations. FOCAL is an interpreted language, which means that programs written in FOCAL are not compiled into machine code. Instead, they are interpreted by the FOCAL interpreter. This makes FOCAL a portable language, as programs can be run on any computer with a FOCAL interpreter. FOCAL is a simple language that is easy to learn and use. It is suitable for writing small programs.