Jamie McCracken wrote:
[indent=2]
init
string.join (",", \
"item1", \
"item2")
the backslash must be the last character on the line
That's odd, I tried to compile a similar example from Windows and the
compiler raised a syntax error, I was using Vala 0.78
Perhaps it's a line termination issue, I cannot check right now
because I am at work. Can anyone else check if this is a error of the
Windows build?
I dont use windows so cannot say but valac syntax support should be
identical. I am also thinking of allowing automatic line continuations
if last character of a line is a comma (without need of a backslash) in
future versions of Genie
This would be a great idea, also consider allowing some operators like
"+" for string concatenation and "and/or" for complex conditions.
Actually, on second thought Genie _could_ be smart enough to detect line
continuation in every possible case. I believe Python can do it, so I
don't see why Genie can't.
By the way, I have confirmed that in the Windows build of Vala 0.7.8, if
you save Genie files with line termination as CR+LF instead of only LF,
you cannot use the backslash to split lines, because the compiler raises
a syntax error. I don't know if this affects only Genie or could in some
way also affect Vala (after all, the compiler is the same).
Regards, Hugo
PS. Jamie, I sent this message to you by mistake, I intended sending it
to the list, so please forgive me if you receive it double.
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list