From c4cdcc8db74328c96a50c854ecac93eb9c58483d Mon Sep 17 00:00:00 2001 From: Barry Walsh Date: Fri, 28 Mar 2014 13:57:50 +0000 Subject: [PATCH] Another sample file for .r extension --- samples/Rebol/booters.r | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 samples/Rebol/booters.r diff --git a/samples/Rebol/booters.r b/samples/Rebol/booters.r new file mode 100644 index 00000000..61ecf54a --- /dev/null +++ b/samples/Rebol/booters.r @@ -0,0 +1,31 @@ +REBOL [ + System: "REBOL [R3] Language Interpreter and Run-time Environment" + Title: "Special boot native function specs" + Rights: { + Copyright 2012 REBOL Technologies + REBOL is a trademark of REBOL Technologies + } + License: { + Licensed under the Apache License, Version 2.0. + See: http://www.apache.org/licenses/LICENSE-2.0 + } + Purpose: { + These are used to define natives and actions. + Bind attributes for this block are: BIND_SET and SHALLOW + } +] + +; Special block used as spec to the datatype test functions (e.g. time?): +["Returns TRUE if it is this type." value [any-type!] 0] + +; The native function must be defined first. This is a +; special boot function created manually within the C code. +native: native [ + {Creates native function (for internal usage only).} + spec ; [block!] -- no check required, we know it is correct +] + +action: native [ + {Creates datatype action (for internal usage only).} + spec ; [block!] -- no check required, we know it is correct +]