]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani: allow spaces in numbers.
[ocean] / csrc / oceani.mdc
index 342182ee3ae6804f08950595bd3d6a3361eb95f5..86b3e3cb844ddd5fde3ffe8c9243bb21e962a735 100644 (file)
@@ -169,8 +169,9 @@ structures can be used.
                struct parse_context context = {
                        .config = {
                                .ignored = (1 << TK_line_comment)
-                                        | (1 << TK_block_comment),
-                               .number_chars = ".,_+-",
+                                        | (1 << TK_block_comment)
+                                        | (1 << TK_mark),
+                               .number_chars = ".,_+- ",
                                .word_start = "_",
                                .word_cont = "_",
                        },
@@ -4186,7 +4187,7 @@ things which will likely grow as the languages grows.
 ###### demo: hello
 
        const:
-               pi ::= 3.1415926
+               pi ::= 3.141_592_6
                four ::= 2 + 2 ; five ::= 10/2
        const pie ::= "I like Pie";
                cake ::= "The cake is"
@@ -4275,7 +4276,7 @@ things which will likely grow as the languages grows.
                // Dad taught me - the first one I ever heard of.
                for i:=1; then i = i + 1; while i < size:
                        n := list[i-1] * list[i-1]
-                       list[i] = (n / 100) % 10000
+                       list[i] = (n / 100) % 10 000
 
                print "Before sort:",
                for i:=0; then i = i + 1; while i < size: