majstang wrote: ↑
11 Aug 2020, 16:50
Thank you A_AhkUser that was good information
i'm glad that was helpful
(...) Normally yes, but in this case I had to include the ':=' because it is required EasyINI syntax for write to inis.
I would agree without reservation for the last example but, unless I'm missing something, I am more doubtful for the penultimate one (where your :=
assignment operator lacks its first member (the variable which is intented to store the result of the expression): in this case, :=
is, at least, dispensable (but I could be wrong).
Applying it in a ternary was what confused me. Oh, so the third operand can be omitted! That is perfect because these one-liners tend to be very space consuming.
For conditional assignment, I prefer use a simple expression instead of a ternary operation:
Code: Select all
var := false
(not var && var:=function())
MsgBox % var
; ((EasyIni[Section].live <> "") && EasyIni[Section].live:=mid$(EasyIni[Section].live, 1, 0))
These one-liners is nice exercise.
I fully agree