v0.3.3: is lib word, UTF–8 string support

This commit is contained in:
Luxferre
2026-07-07 08:16:01 +03:00
parent 836a7c5380
commit a9f23d7861
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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]`. - **Description**: Defines the entry point of the program by setting the `_main` word to execute `[actions]`.
#### `is` #### `is`
- **Syntax**: `is name [actions]` - **Syntax**: `name is [actions]`
- **Stack Effect**: `( -- )` (parses name and actions Q-form from the execution stream). - **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 ]`. - **Description**: A synonym/helper for `::` used to define inline words. Defined as `[ next defw ]`.
+3 -3
View File
@@ -224,10 +224,10 @@ if [
my_inline 100 = if [ " :: (inline) PASS" puts cr ] [ " :: (inline) FAIL" puts cr ] # Test inline :: 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 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 ":: 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 = my_is_word 200 =
is "my_is_string_word" [ 300 ] :: "my_inline_string_word" [ 400 ]
my_is_string_word 300 = and my_inline_string_word 400 = and
if [ " is PASS" puts cr ] [ " is FAIL" puts cr ] # Test is if [ " is PASS" puts cr ] [ " is FAIL" puts cr ] # Test is
" _start PASS" puts cr # Test _start (executed via entry point) " _start PASS" puts cr # Test _start (executed via entry point)