v0.3.3: is lib word, UTF–8 string support
This commit is contained in:
+2
-2
@@ -572,6 +572,6 @@ These words are defined in the standard library file `lib.clx` and loaded dynami
|
||||
- **Description**: Defines the entry point of the program by setting the `_main` word to execute `[actions]`.
|
||||
|
||||
#### `is`
|
||||
- **Syntax**: `is name [actions]`
|
||||
- **Stack Effect**: `( -- )` (parses name and actions Q-form from the execution stream).
|
||||
- **Syntax**: `name is [actions]`
|
||||
- **Stack Effect**: `( name -- )` (parses actions Q-form from the execution stream).
|
||||
- **Description**: A synonym/helper for `::` used to define inline words. Defined as `[ next defw ]`.
|
||||
|
||||
@@ -224,10 +224,10 @@ if [
|
||||
my_inline 100 = if [ " :: (inline) PASS" puts cr ] [ " :: (inline) FAIL" puts cr ] # Test inline ::
|
||||
5 then 5 = if [ " then PASS" puts cr ] [ " then FAIL" puts cr ] # Test then
|
||||
":: source_test_word [ 99 ]" "test_source.clx" writef drop source test_source.clx source_test_word 99 = if [ "test_source.clx" delf " source PASS" puts cr ] [ "test_source.clx" delf " source FAIL" puts cr ] # Test source
|
||||
is my_is_word [ 200 ]
|
||||
my_is_word is [ 200 ]
|
||||
my_is_word 200 =
|
||||
is "my_is_string_word" [ 300 ]
|
||||
my_is_string_word 300 = and
|
||||
:: "my_inline_string_word" [ 400 ]
|
||||
my_inline_string_word 400 = and
|
||||
if [ " is PASS" puts cr ] [ " is FAIL" puts cr ] # Test is
|
||||
" _start PASS" puts cr # Test _start (executed via entry point)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user