Forum > Beginners

Character variables and other languages [SOLVED]

<< < (2/4) > >>

pascal111:

--- Quote from: Thaddy on May 07, 2021, 06:47:02 pm ---
--- Quote from: Bart on May 07, 2021, 06:31:47 pm ---Char is just a single byte.

--- End quote ---
No, it isn't. <first tme this year grumpy mode  >:D >:D >:D >

Bart, you are smart and you know that.

--- End quote ---



ماذا؟!!

إنّهُ من المنطقي أنّ مُتغير اللبنة لا يحوي قيمة أكبر من 255 وهي القيمة العظمى ﻷكواد الـ Ascii والتي لا تشغل إلا بايت واحد فقط كما هو المُعتاد منذ أيّام الـ DOS.

هل هناكـ أي تحديثات على ذلكـ في الـ Lazarus freePascal وفي الأنظمة الحديثة الحالية والتي تحوي لغات بشريّة مُتعددة.


google translate:

"What?!!

It is logical that the block variable does not contain a value greater than 255, which is the maximum value for Ascii codes, which only occupy one byte as usual since the days of DOS.

Are there any updates on that - in the Lazarus freePascal and in the current modern systems that contain multiple human languages."

pascal111:

أظنّ أنّ wp@ على صواب حيث نتيجة الكود التالي كما قال ،حجم نوع اللبنة بايت واحد وواحد فقط.



google translate:

"I think wp @ is correct as the result of the following code as it said, the size of the type of block is only one and one byte."



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---showmessage(inttostr(sizeof(char))); 

Thaddy:

--- Quote from: pascal111 on May 07, 2021, 07:21:07 pm ---
أظنّ أنّ wp@ على صواب حيث نتيجة الكود التالي كما قال ،حجم نوع اللبنة بايت واحد وواحد فقط.



google translate:

"I think wp @ is correct as the result of the following code as it said, the size of the type of block is only one and one byte."



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---showmessage(inttostr(sizeof(char))); 
--- End quote ---

No, it is not. It can be anything between 1 and 4 bytes depending on mode....
btw Bart will tell you the same.

pascal111:

--- Quote from: Thaddy on May 07, 2021, 07:24:43 pm ---No, it is not. It can be anything between 1 and 4 bytes (depending on mode....)
btw Bart will tell you the same.

--- End quote ---

أعتقد أنّكـ تعني باستخدام بعض مُوجّهات المُترجم directives يُمكن تكييف mode ما.


google translate:

"I think you mean by using some "compiler directives" directives a mode (of something) can be adapted."

wp:

--- Quote from: Thaddy on May 07, 2021, 07:24:43 pm ---No, it is not. It can be anything between 1 and 4 bytes depending on mode....
btw Bart will tell you the same.

--- End quote ---
OK - {$mode delphiunicode} makes it a widechar with two bytes (I don't know how to invoke a three-byte or four-byte char...).

But Bart's answer exactly clarified the point which the OP was misunderstanding. Your uncommented answer only caused confusion again.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version