Page 2 of 3

[Implemented] Compiler Feature : Check for Syntax

Posted: Tue Jun 05, 2007 3:59 pm
by Flype
+1

yes, good idea flype.

Posted: Tue Jun 05, 2007 7:01 pm
by blueznl
don't care :shock:

:lol:

Posted: Tue Jun 05, 2007 7:02 pm
by ts-soft
blueznl wrote:don't care :shock:

:lol:
+ 1

Posted: Tue Jun 05, 2007 7:22 pm
by Flype
:lol:

it was just for amusing myself.

and have one more vote :wink:

Posted: Wed Jun 06, 2007 12:57 am
by Tranquil
Tranquil wrote::-) SMALL(?) enhancement to the IDE?
@Flype:

answering own posts is total lame! :mrgreen: :roll:

Posted: Fri Jun 13, 2008 7:24 pm
by Blue
Just the suggestion I was about to post. :shock:

Allow me to join Flype (who posted his answer to Flype !!!) in saying:
Good idea, Flype. :!:

This is a must as a time-saver in large projects.

Posted: Fri Jun 13, 2008 11:17 pm
by blueznl
Perhaps I should rephrase it. I'd LOVE a REAL TIME syntax check as GfaBasic had, it just wouldn't let you leave a line in the editor if there was a syntax error on that line.

Now that might be a bit harsh, but one could think of colouring lines that contain syntax errors whilst editing.

That would be a definite +1. It doesn't make much sense to have a dedicated function, those errors would show up when compiling, no, you want to fix your errors the moment you make them!

Posted: Fri Jun 13, 2008 11:46 pm
by Kaeru Gaman
to blueznl's suggestion:
this feature can be useful, but I'd like it to be optional.
sometimes you might like to write half a line, continue in another line,
and then complete the line before.
or you want to copy the incomplete line to insert it ten times and then fill it with different arguments.
for this it is necessary to switch the on-the-fly-check off.

anyhow: an extra syntax-check without running would be a useful idea...
...but this thread is one and a half years old....

Posted: Sat Jun 14, 2008 2:32 am
by freak
Fred and I discussed this once, and basically what he said was that this "Syntax check mode" would
not be significantly faster than a normal compilation as the compiler needs to do all the work anyway.
So basically all you could gain is the assembly and linking stages, and those are only reached when all
syntax was correct anyway. So unless you plan to check your syntax mostly when there are no errors at all,
you can just as well hit F5 to check your syntax.

As for the on-the-fly syntax checks: This was something i had in mind since quite a while ago,
but it was always pushed aside by other things and is not really a big priority for me right now.
So maybe someday, who knows ?

Posted: Sat Jun 14, 2008 8:06 am
by Kaeru Gaman
freak wrote:Fred and I discussed this once, and basically what he said was that this "Syntax check mode" would
not be significantly faster than a normal compilation as the compiler needs to do all the work anyway.
So basically all you could gain is the assembly and linking stages, and those are only reached when all
syntax was correct anyway. So unless you plan to check your syntax mostly when there are no errors at all,
you can just as well hit F5 to check your syntax.
would it be possible to add some "compile but don't run" feature? e.g. Shift-F5
perhaps I want to check if my syntax is correct, but not have a screen opened,
tons of grafix loaded and to click through five screens to exit my game again...

Posted: Sat Jun 14, 2008 10:18 am
by blueznl
freak wrote: As for the on-the-fly syntax checks: This was something i had in mind since quite a while ago
Well, it would be my third license :-)

Posted: Sat Jun 14, 2008 2:34 pm
by JCV
Kaeru Gaman wrote:would it be possible to add some "compile but don't run" feature? e.g. Shift-F5
This is definitely helpful if you only intend to check syntax specially on large projects. I sometimes compile my project just to check if there are syntax errors and just imagine how long the compiled program will open and you will just terminate it. This will save time.

Posted: Sat Jun 14, 2008 5:19 pm
by Raybarg
JCV wrote:
Kaeru Gaman wrote:would it be possible to add some "compile but don't run" feature? e.g. Shift-F5
This is definitely helpful if you only intend to check syntax specially on large projects. I sometimes compile my project just to check if there are syntax errors and just imagine how long the compiled program will open and you will just terminate it. This will save time.
Could you just add End in the beginning of your code? It still compiles everything, right?

Posted: Sat Jun 14, 2008 11:18 pm
by Blue
Raybarg wrote:[...]Could you just add End in the beginning of your code? It still compiles everything, right?
eh, eh ! Not a bad half-ass solution. :wink: ...assuming. of course, thst everything gets compiled, indeed.

I'll try it right away.

Thanks for the idea, Raybarg.

Posted: Mon Jun 16, 2008 4:03 pm
by CSAUER
That seems to work.

May be an idea for freak:
Could you please implement a menu item which temporary add's a "end" command to the compilation?
It should not really be in the code editor, just only temporary in memory before compilation.
This could be the easy way for a solution. Does not bring a time benefit on compilation, but keeps the program away from doing its stuff (like loading ressources, database access, etc.).