Forum > General

C operators and shift

(1/10) > >>

Okoba:
With {$COPERATORS ON}  you can write:

--- 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";}};} ---I *= 2;I := I >> 1;But you can not write

--- 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";}};} ---I >>= 1;
Why?

alpine:
Are you sure you can write:
--- 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";}};} ---I = I >> 1; ?

Okoba:
Sorry for the typo. Should be fixed now.

MarkMLl:
Because the compiler developers are still engaged in collective flagellation over the presence of /any/ of += -= *= etc. in the language, so don't even dream of it.

Also remember that you get into trouble with shifts > 31... not directly related, just a reminder.

MarkMLl

Okoba:
Thank you.

Navigation

[0] Message Index

[#] Next page

Go to full version