@guest3456: Yes, those first braces are unnecessary. It's there because I paste all of my examples from a scratchpad function. It's doesn't hurt to include them in posts, and it is less work for me to remove braces and indentation.
@AfterLemon: I considered that at first, too. The particular case where I find this function beneficial is outlined below. It saves a little bit of coding headache and also reduces potential for small errors.
Shown below, I use this type of on-the-fly debugging on a daily basis, and the concat function makes my life a little easier...
Code: Select all
{
; Consider...
Loop 5
iVar%A_Index% := A_Index
Msgbox % st_concat("`n", iVar1, iVar2, iVar3, iVar4, iVar5)
; vs...
Msgbox % iVar1 "`n" iVar2 "`n" iVar3 "`n" iVar4 "`n" iVar5
; Note this is moot with arrays.
ai := []
Loop 5
ai[A_Index] := A_Index
Msgbox % st_concat("`n", ai*)
; vs...
Msgbox % st_glue(ai)
return
}