Basic question on syntax

I notice this code in the Intro to Programming with Xojo PDF:

If PotatoRadio.Value Then theOrder = theOrder + PotatoRadio.Caption theOrder = theOrder + EndOfLine End If

Is there a good reason not to simply code it this way in Xojo:

If PotatoRadio.Value Then theOrder = theOrder + PotatoRadio.Caption + EndOfLine End If

I know the above works in the practice example offered, but are there situations where one should not append the second line of code with the EndOfLine reference? Coming from Filemaker development, I’ve always done this the second way.

its more personal preference than anything really - there’s a VERY tiny performance hit to the first but so small I doubt you’d be able to measure it unless you do this billions of times in a loop or something

make your code readable whatever way you do it

That’s what I figured and hoped. Thanks, Norman.

I sure get quick replies on this forum.

I was told sleep was optional :slight_smile:

along with food, family life, social life, and many other unnecessary things :stuck_out_tongue:

No, no. Food is not optional, although you should try to keep the Doritos crumbs out of the keyboard. :wink:

Doritos … ha !
Cheezies are vastly superior (no not Cheezits)

you can even do more:

If PotatoRadio.Value Then
theOrder = theOrder +_
      PotatoRadio.Caption +_
      EndOfLine
End If

[quote=223971:@Norman Palardy]Doritos … ha !
Cheezies are vastly superior (no not Cheezits)[/quote]
must be a Canadian thing… here we have Cheetos

https://en.wikipedia.org/wiki/Cheetos

Cheezies are VERY canadian

Cheetos are a knock off thats no where near as good :stuck_out_tongue:

wasn’t trying to disparage Cheeses… but I can’t imagine anything too much worse than Cheetos (puffed air coated in fake cheese).

Cheezies & a pepsi = dinner :slight_smile: