Il 03.07.2020 18:44, Dmitry Boyarintsev via lazarus ha scritto:
On Fri, Jul 3, 2020 at 10:08 AM Special via lazarus <lazarus@lists.lazarus-ide.org <mailto:lazarus@lists.lazarus-ide.org>> wrote:

    on a Elementary  School near Heidelberg the nine-years-old pupils
    learn
    programming with Delphi 10.3 Community Edition. In one of the
    programs
    they use 'Type ZimmerType = (Küche, Wohnzimmer, Schlafzimmer);",


Having educational purposes in mind, can variable masking be achieved through IDE itself, rather than the compiler.

If a character outside of ANSI range is met within an identifier, IDE would replace it with something else. So, instead of having "Küche" the source code would look like "K_Ache". (the next character would be replaced with _B, _C ..and so on)

It doesn't have to be done on the fly, it could be done before starting the compilation.
There are two benefits with this approach:
* no changes are needed for the compiler. (works with any version)
* the language rules of capitalization can be followed

Living in Switzerland, where German is one of the national languages, we oft face problems like this.

In this case, we simply substitute "ä" with "ae", "ö" with "oe" and "ü" with "ue". So: Küche -> Kueche. And: "ß" -> "ss".

Freundliche Grüße aus der Schweiz :)


-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to