diff --git a/clyx_manual.md b/clyx_manual.md index 6b647c0..491939b 100644 --- a/clyx_manual.md +++ b/clyx_manual.md @@ -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 ]`. diff --git a/test.clx b/test.clx index 7a98d5d..b9b4fed 100644 --- a/test.clx +++ b/test.clx @@ -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)