Page 1 of 1

Unicode characters in variable names

Posted: 11 Nov 2013 9:58
by Ferenc Nagy
Hi,

I keep working on free location, ablolute and relative sizing of the message window.
I inserted the attached figure#~ made of group boxed and static text fields into my form.
The text fields contain arrows and/or Greek letters alpha, beta, gamma and delta.
I defined some of the text fields as fact variables other as simple variables.
I collected the interesting parts of he automatically generated lines in Figure#2.

What characters are in the set of elementsof valid variable, fact variable and constant names, respectively in VIP 7.x versions?


Is the statement shown in Figure#3 valid?

Posted: 12 Nov 2013 21:27
by Thomas Linder Puls
I am not completely sure I understand the question (or why there are so many images attached).

But perhaps this answers the question:

Visual Prolog follows the Unicode standard (as implemented in the Windows operating system) to classify characters as uppercase and lowercase letters.

The advice is as always to use good names. Which in my mind implies using letters you (and those that you share code with) are comfortable with. There is no reward for pushing the system to its boundary.

The easiest way to see if your choice of characters makes sense is by compiling the code: wrong characters will give syntax errors.

Naming quandaries

Posted: 13 Nov 2013 11:42
by Ferenc Nagy
The advice is as always to use good names. Which in my mind implies using letters you (and those that you share code with) are comfortable with. There is no reward for pushing the system to its boundary.
Which is your practice?
There are contradictory schools of naming.
Do you know San Sieler's article "How to write quality Pascal Programs" http://www.allegro.com/papers/htpp.html?

Before the invention of qualifier like :: in VIP and namespaces the best way to avolid collision of locas names with reserved one was to use Hungarian words without accents.

PHP 5 allowed the using - not yet Unicode - accented characters. I sent the solution of a trial program somewhere using accented Hungarian varable and funcion name. The reviewer refused it: "YOU MUST USE EXCLUSIVELY ENGLISH NAMES!!!"

Posted: 13 Nov 2013 19:07
by Thomas Linder Puls
Visual Prolog is programmed for a global audience. Therefore we stick to English. US-english: "color" rather than "colour", etc. This also implies that we only use a-z.

We more or less follow the principles described in Code Formatting.

We also think a lot about regularity, consistency and patterns. And we regularly discuss which names to use for something: "What name do you think should be used for this?"

No matter which country you come from you will of course have to accept that PFC uses English.

But what you use in your own code is up to you: good native names may be preferable to bad English names.

Which names to use

Posted: 14 Nov 2013 17:38
by Ferenc Nagy
Hi,
And we regularly discuss which names to use for something: "What name do you think should be used for this?"
Where did you discuss it?

Back to your former question:
I wanted to ember the Russian text in the message body. The text field accepted the Russian characters but the submitted message displayed a HTML-entities: ampersand ladder four digits and semicolon instead of them.


The workaround was the attached sample of the screen made by PicPick (R).

Another technical question:
How can I insert images using the bracket img bracket in my messages?

[/img]

Re: Which names to use

Posted: 15 Nov 2013 16:27
by Thomas Linder Puls
Ferenc Nagy wrote:
And we regularly discuss which names to use for something: "What name do you think should be used for this?"
Where did you discuss it?
We are my colleguea and me, and we simply talk or write mails.
Ferenc Nagy wrote:Back to your former question:
I wanted to ember the Russian text in the message body. The text field accepted the Russian characters but the submitted message displayed a HTML-entities: ampersand ladder four digits and semicolon instead of them.
Yes, teh forum software cannot handle full Unicode in the code tags, but it handles it fine text: 㣲

Code: Select all

㣲
But I am still not sure what the question is? If it is what I think then it is already answererd in my first reply.
Ferenc Nagy wrote:Another technical question:
How can I insert images using the bracket img bracket in my messages?
The [img] can only be used to link to an image that is somewhere on the Internet: [img]http://image_url[/img]

Technical question about the text editor of the user interface of this forum

Posted: 16 Nov 2013 8:08
by Ferenc Nagy
Yes, teh forum software cannot handle full Unicode in the code tags, but it handles it fine text: 㣲

㣲

But I am still not sure what the question is? If it is what I think then it is already answererd in my first reply.
Try yourself: enter some words in a language that do uses non-Latin characters using charmap or the languages keyboard and then submit it to the forum.

The editing phase makes you believe that the character go through readable.
The submitted message however contained html-codes as in the above quote.

ישﬡל

I know that this misbehavior is not important in this forum still it would be easier in my first post in this thread to embed the Russian example as plain text instead to attach it.

P. S.

Good news: I saw the inserted Hebrew characters after submitting this re:re:reply.