Posts: 28
Threads: 10
Joined: Nov 2012
Reputation:
0
Please, Could be possible to add an command option to require declare all variables.
I think, not declared variables is the source of bugs more difficult to find.
The problem is worse when you consider that BASIC is case sensitive.
Posts: 1,831
Threads: 56
Joined: Aug 2019
Reputation:
25
This is "pending" task; it will eventually be implemented. It's the flag Explicit (see -lang qb)
<!-- m --><a class="postlink" href="http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgOptionexplicit">http://www.freebasic.net/wiki/wikka.php ... onexplicit</a><!-- m -->
I will implement it both as
#pragma option explicit
and as a command line flag: --option explicit
What do you think?
Posts: 28
Threads: 10
Joined: Nov 2012
Reputation:
0
Perfect!
I think the sintaxis is very clear.
When you have the option implemented, I'll start using it.
As Pascal enthusiast, I think it should be active by default.
Posts: 28
Threads: 10
Joined: Nov 2012
Reputation:
0
It's great!
Many thanks. Both options are checked and are working perfectly.