Terrapin Resources

Terrapin Logo 4 has been discontinued! Our new Terrapin Logo version is much more powerful and modern; we strongly recommend that you update to our latest release of the Logo programming language.

Other commands

This section contains commands that do not fit into any other category.

.WINDOWS

Call a Windows system function (not available on the Mac).

Syntax

Description

.WINDOWS provides a limited interface to the Windows API. Its first input is either the name of the Windows API function or a list of two elements. The first element of the list is the function name and the second element is the name of the DLL where the function is located. The function name is case-sensitive. Logo performs an automatic search for an ASCII-specific version of the function if it cannot be found. The function MessageBox, for example, is defined as MessageBoxA in the ASCII version.

Optional function parameters may be supplied. They will be pushed on the stack in Pascal order. Numbers are pushed as 32-bit integers. Symbols are pushed as ASCII strings. Lists are converted to an ASCII string. A bytearray may be used as a buffer for return values or for structures. When you supply a bytearray, the address of its data area is pushed. The output is the 32-bit integer outcome of the Windows API function. FILLARRAY to fill a bytearray with a text string. For converting output in a bytearray into a Logo word, use <a TEXTARRAY.

Please note that supplying incorrect parameters to a Windows API function may crash Windows.

This command is not available in the Macintosh version of Terrapin Logo. The command will not be available in future versions of Terrapin Logo.