allow Unicode letters in identifiers: things like 'knäckebröd' and 'π' are now valid identifiers. Added floats.π constant.

This commit is contained in:
Irmen de Jong
2023-12-05 01:34:41 +01:00
parent 6ebd4e821f
commit 7d8b42d63e
10 changed files with 56 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ Module file
-----------
This is a file with the ``.p8`` suffix, containing *directives* and *code blocks*, described below.
The file is a text file which can also contain:
The file is a text file, saved in UTF-8 encoding, which can also contain:
Lines, whitespace, indentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -247,7 +247,8 @@ Identifiers
-----------
Naming things in Prog8 is done via valid *identifiers*. They start with a letter,
and after that, a combination of letters, numbers, or underscores. Letters are from the 7-bit ASCII alphabet only.
and after that, a combination of letters, numbers, or underscores.
Note that any Unicode Letter symbol is accepted as a letter!
Examples of valid identifiers::
a
@@ -256,6 +257,9 @@ Examples of valid identifiers::
COUNTER
Better_Name_2
something_strange__
knäckebröd
приблизительно
π
Code blocks