home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
pd6.lzh
/
DOC
/
blocks.doc
< prev
next >
Wrap
Text File
|
1989-12-21
|
3KB
|
71 lines
BLOCKS(2) LITERAL CODE BLOCK FUNCTIONS BLOCKS(2)
NAME
blocks - definition and execution of code blocks
SYNOPSIS
#include blocks.f83
blocks ( -- )
+block ( addr1 -- addr2) private
block[ ( -- ) immediate
]; ( -- block ) immediate
call ( block -- )
DESCRIPTION
Allows definition and execution of code blocks. An alternative
to passing functions as arguments.
+block ( addr1 -- addr2) private
Field access variable to calculate the offset for in-line block
literals in colon definitions.
block[ ( -- ) immediate
Used in the following form:
block[ <block-definition> ];
Start the definition of a code block. Compiles a code block until
"];" and returns the address to the code block. The code block
may be executed using "call". Code block may contain definitions
of other code blocks. A code block should not contain "does>" or
"exception>" as these require a vocabulary entry.
]; ( -- block) immediate
Marks the end of a code block. Returns a pointer to the code block.
call ( block -- )
Executes a code block. Any parameters used by the code block are
passed as usual on the parameter stack. Return values are handled
in the same manner.
SEE ALSO
forth(1), compiler(1)
COPYING
Copyright (C) 1989 Mikael R.K. Patel
Permission is granted to make and distribute verbatim copies
of this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions
of this manual under the conditions for verbatim copying,
provided also that the section entitled "GNU General Public
License" is included exactly as in the original, and provided
that the entire resulting derived work is distributed under
the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of
this manual into another language, under the above conditions
for modified versions, except that the section entitled "GNU
General Public License" may be included in a translation approved
by the author instead of in the original English.
AUTHOR
Mikael R.K. Patel
Computer Aided Design Laboratory (CADLAB)
Department of Computer and Information Science
Linkoping University
S-581 83 LINKOPING
SWEDEN
Email: mip@ida.liu.se