Forum > General

C not and ternary conversion to pascal question.

<< < (6/6)

Zvoni:

--- Quote from: jamie on September 25, 2024, 01:04:55 am ---Thanks for the interest taking on this, I didn't think that it was going to generate such a traffic log.

So, I ended up doing this which seems to work.


--- 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";}};} ---A_Double_Variable := IIfThen( Not (the condition test), True_Selection_Value, False_selection_Value);  
Thanks.

--- End quote ---
Yo do realize that is basically what I wrote?

TRon:

--- Quote from: Zvoni on September 25, 2024, 09:52:39 am ---Yo do realize that is basically what I wrote?

--- End quote ---
Indeed, exactly as I wrote  :P

Problem is that no matter what the code still suffers from the basic evaluation difference between c and pascal that has been discussed a zillion times before (and is done here as well).

So for TS, in case you are manipulating a variable used for both the condition and the 'selection(s)' you get yourself into trouble as that works differently in c as it does for pascal. Therefore be careful when using functions/procedures that are used for the condition and/or the result value(s).

Navigation

[0] Message Index

[*] Previous page

Go to full version