Forum > General
[SOLVED] Howto use a DEFINE present in an installed package
CharlyTango:
--- Quote from: tintinux on November 25, 2024, 04:27:36 pm ---
which could help me if I could write in my projects
--- 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";}};} ---{$IF ZEOS80UP}// Code for 8.0{$ELSE}// Code for older version{$ENDIF}
--- End quote ---
ZEOS provides a version-variable you can use:
--- 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";}};} --- if (ZEOS_MAJOR_VERSION >= 8) then //code for 8.0 following else // Code for older version ;
MarkMLl:
--- Quote from: CharlyTango on November 28, 2024, 09:56:45 am ---ZEOS provides a version-variable you can use:
--- 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";}};} --- if (ZEOS_MAJOR_VERSION >= 8) then //code for 8.0 following else // Code for older version ;
--- End quote ---
That's not a compile-time operation, so is NBG if he wants to refer to things which exist only in a later (or earlier) version or have different parameter lists etc.
MarkMLl
marcov:
If it is a proper constant you can also test them with $if
tintinux:
--- Quote from: MarkMLI ---That's not a compile-time operation, so is NBG if he wants to refer to things which exist only in a later (or earlier) version or have different parameter lists etc.
--- End quote ---
Yes !
--- Quote from: marcov ---If it is a proper constant you can also test them with $if
--- End quote ---
How ?
Remy Lebeau:
--- Quote from: tintinux on November 28, 2024, 06:22:12 pm ---
--- Quote from: marcov ---If it is a proper constant you can also test them with $if
--- End quote ---
How ?
--- End quote ---
--- 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";}};} ---{$IF (ZEOS_MAJOR_VERSION >= 8)}//code for 8.0 following{$ELSE}// Code for older version{$ENDIF}
Navigation
[0] Message Index
[#] Next page
[*] Previous page