Forum > Editor

[closed]Variable Declaration Completion as Double

(1/3) > >>

m.abudrais:

--- 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";}};} ---procedure TForm1.Form1Create(Sender: TObject);begin  MyFloat:=3.1;end;when I press  ctrl +shift +c  MyFloat is declared as Extended, is there an option to change it to Double?

Thaddy:
Depends on your platform: if it is Windows 64 a double is the exact same as extended......
So more information is needed to give a correct answer...


In general the resolution is chosen as the maximum available, though, for floats, whereas with integers the minimum is chosen.

lucamar:

--- Quote from: m.abudrais on May 02, 2019, 08:32:06 am ---
--- 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";}};} ---procedure TForm1.Form1Create(Sender: TObject);begin  MyFloat:=3.1;end;when I press  ctrl +shift +c  MyFloat is declared as Extended, is there an option to change it to Double?

--- End quote ---

Seems to be fixed: For FP values, Extended, for integers, Integer, etc. Even if you try something like:
--- 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";}};} --- Big := 5000000000;which requires a 64 bit integer, completion declares Big as Integer (which in 32 bits, like here, is LongInt).

m.abudrais:
I use lazarus 2.0.2 32bit, but my OS is win7 64bit

Thaddy:
The 32 bit Windows Lazarus  should choose true extended (80 bits) instead of double...Even on a 64 bit Windows system... I can't test this, but that may be a bug.. (I have no 32 bit windows software installed since a very long time).
If this is the case, report it against Lazarus IDE because the compiler does everything correct in your case.
I am not aware of any options you asked for, as per my first answer.

Navigation

[0] Message Index

[#] Next page

Go to full version