Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A silly question
#4
(10-27-2019, 10:29 PM)carmen Wrote: Thanks!
Yes,both are booleans and not exclusive: I can conceivably wish to output a webp (or indexed png) both grayscale (I always work in RGB) and without margins, as those are better added through css in an epub... more control.

I dare say I shall try all variants... although it will take me some to get used to 'x+=y' ... as did accepting 'x=x+y' without concluding 'y=0', and remembering moreover that one had lost the initial value of 'x'--live and learn!

Cute the variant with list and formatting!

x+=y is fairly frequent. It is actually more readable that x=x+y because you don't have to check that it's the same variable on both sides.

Compare:
Code:
offsetX+=1
offsetY+=1
offsetZ+=1

with:

Code:
offsetX=offsetX+1
offsetY=offsetZ+1
offsetZ=offsetY+1

Did you catch the Y<->Z swap in the last one?

Formatting is IMHO the preferred method.
Reply


Messages In This Thread
A silly question - by carmen - 10-27-2019, 08:30 PM
RE: A silly question - by Ofnuts - 10-27-2019, 09:07 PM
RE: A silly question - by carmen - 10-27-2019, 10:29 PM
RE: A silly question - by Ofnuts - 10-27-2019, 11:33 PM

Forum Jump: