Forum > Windows
[Solved] Where is procedure Delete(), often used in old DELPHI code ?
PeterX:
Hi,
I searched the WWW but ..
I searched the Forum but ..
I have a old Delphi file where there was
--- 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";}};} --- begin delete( s, length(s), 1); ... end;
Originally in uses there was
--- 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";}};} ---uses Windows,...
But with Interfaces and JwaWindows the delete() procedure cannot be found
says the compiler ..
I searched the LAZARUS installation folder and ..
I found out, in Freepascal the delete function is in: system.fpd
Also in systemh.inc line 1082
But it didn't help me jet ..
Which Unit in USES
do I need to be able to call delete() ?
%)
marcov:
Delete, as all functions in system.fpd are built-ins. They are core language parts and built in to the compiler.
The system.fpd is a mock declaration of them for the documentation system, as these functions are documented. Built-ins are always there (only depending on compiler mode), but they are documented as part of system.
PeterX:
--- Quote from: marcov on July 11, 2021, 02:04:59 pm ---Delete, as all functions in system.fpd are built-ins. They are core language parts and built in to the compiler.
The system.fpd is a mock declaration of them for the documentation system, as these functions are documented. Built-ins are always there (only depending on compiler mode), but they are documented as part of system.
--- End quote ---
Okay,
but when commenting out Windows in USES, and using JwaWindows instead,
I get xxx.pas(377,15) Error: Illegal expression
I use {$mode objfpc}{$H+}
Probably some other of my Units has also declared a delete() procedure or function.
This is the only reason I could imagine, why delete() is hidden ..
marcov:
--- Quote from: PeterX on July 11, 2021, 02:07:27 pm ---Probably some other of my Units has also declared a delete() procedure or function.
This is the only reason I could imagine, why delete() is hidden ..
--- End quote ---
Just call system.delete() in such cases.
And in general, just use Windows as much as possible, and if it has deficiencies, file bugs.
Moreover, if you need jwa* stuff, use specific units rather than the jwawindows one.
PeterX:
[You where faster ..]
Navigation
[0] Message Index
[#] Next page