[Implemented] Compiler Feature : Check for Syntax
[Implemented] Compiler Feature : Check for Syntax
+1
yes, good idea flype.
yes, good idea flype.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
don't care



( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
+ 1blueznl wrote:don't care![]()
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

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!
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!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
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....
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....
oh... and have a nice day.
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 ?
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 ?
quidquid Latine dictum sit altum videtur
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
would it be possible to add some "compile but don't run" feature? e.g. Shift-F5freak 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.
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...
oh... and have a nice day.
Well, it would be my third licensefreak wrote: As for the on-the-fly syntax checks: This was something i had in mind since quite a while ago

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
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.Kaeru Gaman wrote:would it be possible to add some "compile but don't run" feature? e.g. Shift-F5
[Registered PB User since 2006]
[PureBasic 6.20][SpiderBasic 2.2]
[RP4 x64][Win 11 x64][Ubuntu x64]
Could you just add End in the beginning of your code? It still compiles everything, right?JCV wrote: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.Kaeru Gaman wrote:would it be possible to add some "compile but don't run" feature? e.g. Shift-F5
eh, eh ! Not a bad half-ass solution.Raybarg wrote:[...]Could you just add End in the beginning of your code? It still compiles everything, right?

I'll try it right away.
Thanks for the idea, Raybarg.
Last edited by Blue on Tue Jun 17, 2008 8:53 am, edited 1 time in total.
PB Forums : Proof positive that 2 heads (or more...) are better than one 

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.).
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.).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PB4.1 - Win: MacBook black 2008 2,4 GHz, 4 GB RAM, MacOSX 10.5/VMWare/WinXP
PB4.1 - Mac: MacMini G4 1,4 GHz, 512 MB RAM, MacOSX 10.4
PB4.1 - Win: MacBook black 2008 2,4 GHz, 4 GB RAM, MacOSX 10.5/VMWare/WinXP
PB4.1 - Mac: MacMini G4 1,4 GHz, 512 MB RAM, MacOSX 10.4