Two-pass compile to bypass Declare?
Two-pass compile to bypass Declare?
Is it possible to do a two-pass compile that will "Declare" all of my functions for me?
Re: Two-pass compile to bypass Declare?
No, and it's not planned, and it's the reason why "Declare" exists. Please use
the "Search" function here as the topic has been discussed many times before.
the "Search" function here as the topic has been discussed many times before.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
I did do a search but it's difficult to search for something as arbitrary as "Declare". I couldn't find any other useful keyword to narrow my search.
I already posted a feature request that would make searching the forum easier in some cases.
I already posted a feature request that would make searching the forum easier in some cases.
Hi Mistral.
Closest thing I can think of is that the JaPBe editor creates a file of "declares" for you. I haven't used JaPBe for a while but I assume it still does this.
Two pass would be very good for many reasons but I don't think it is going to happen any time soon because:
(a) The compiler would need to be modified
(b) People think one-pass = sexy and leet. Because back in days of paper tape input it was.
However you never know your luck!
Although "this is not a democracy" (to quote a man I respect greatly) PureBasic is a commercial product so public opinion must have a bearing as the objective is to sell the ruddy thing. So I, for one, am glad you made this a request and didn't just accept the status quo.
Closest thing I can think of is that the JaPBe editor creates a file of "declares" for you. I haven't used JaPBe for a while but I assume it still does this.
Two pass would be very good for many reasons but I don't think it is going to happen any time soon because:
(a) The compiler would need to be modified
(b) People think one-pass = sexy and leet. Because back in days of paper tape input it was.

However you never know your luck!
Although "this is not a democracy" (to quote a man I respect greatly) PureBasic is a commercial product so public opinion must have a bearing as the objective is to sell the ruddy thing. So I, for one, am glad you made this a request and didn't just accept the status quo.
Dare2 cut down to size
-
- User
- Posts: 67
- Joined: Thu Nov 30, 2006 4:57 pm
- Location: I long for the absolute loneliness of the death
You can make a pre-compiler program what "prepares" source code and adds some data to it, like "Declares", and some other you can need... think about this and you will discover a lot of constructs what you repeat in every program.
Besides, in very big programs with a lot of "include" what "include" more and more subprograms, it's absolutely necessary to "sort" the source, first constants, second structures .... Your pre-compiler can make this.
Later, the pre-compiler invokes the compiler with newly created source.
You can make your own pre-compiler... I've done it.
Besides, in very big programs with a lot of "include" what "include" more and more subprograms, it's absolutely necessary to "sort" the source, first constants, second structures .... Your pre-compiler can make this.
Later, the pre-compiler invokes the compiler with newly created source.
You can make your own pre-compiler... I've done it.
> I couldn't find any other useful keyword to narrow my search
A search for "single pass compiler" has many matches, most notably these:
http://www.purebasic.fr/english/viewtopic.php?t=14971
http://www.purebasic.fr/english/viewtopic.php?t=17861
http://www.purebasic.fr/english/viewtopic.php?t=22754
http://www.purebasic.fr/english/viewtopic.php?t=4994
As you can see, discussed VERY heavily from both parties wanting it, and
those not wanting it. BTW, I meant no disrespect when I asked you to
search; it's just that I know you're new here so I wanted to guide you.
A search for "single pass compiler" has many matches, most notably these:
http://www.purebasic.fr/english/viewtopic.php?t=14971
http://www.purebasic.fr/english/viewtopic.php?t=17861
http://www.purebasic.fr/english/viewtopic.php?t=22754
http://www.purebasic.fr/english/viewtopic.php?t=4994
As you can see, discussed VERY heavily from both parties wanting it, and
those not wanting it. BTW, I meant no disrespect when I asked you to
search; it's just that I know you're new here so I wanted to guide you.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- Enthusiast
- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
I agree that using 'Declare' is annoying, and that a pre-compiler would be the best way to get rid of it.
A reckon Fred and the boys should create a structure by which pre-compilers can be used more easily (perhaps even an official one!), setting it up as a tool via the editor is a bit of a pain and only works with some editors.
A reckon Fred and the boys should create a structure by which pre-compilers can be used more easily (perhaps even an official one!), setting it up as a tool via the editor is a bit of a pain and only works with some editors.
~I see one problem with your reasoning: the fact is thats not a chicken~