Justin wrote:in a big project a 2 pass compiler is a must. you can get easily lost placing includes, interfaces, declares, structures.. at the right place
I dissagree on that one very strongly. I have a 16000 lines program i'am developing at this moment use PB in single pass. The ONLY use for a 'double pass' if to resolve 'forgotten' or wrong declares or includes by the programmer!
But than again I would LIKE to have the option of double pass so I could do without the Declares in the beginning of the program, for the procs that is its ONLY use for it. Sometimes i change a name of a parameter and have to go to two places to correct (yes I know about copy/paste).
Jan V.
Life goes to Fast, Enjoy!!
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)
I agree about the declare issue - it's counter-productive to have to declare because the procedure order is 'wrong'. Is there some other need for declare, apart from making the code perhaps nicer to read?
If the second option were done, maybe it would be better to make procedure variable protected by default (to avoid confusion)?
mskuma wrote:Is there some other need for declare, apart from making the code perhaps nicer to read?
That is enough of a reason to leave it as a single pass compiler in my opinion.
Seriously though, it would be a major change for Fred to convert from a single pass to multipass compiler. For that reason alone, this is extremely unlikely to happen.
A more likely approach would be to have an attachment to the IDE that runs a first pass through the code, extracts all the procedure names and re-writes them as declares, and then either jams them into the top of the source code or into a second include file.
aaron wrote:A more likely approach would be to have an attachment to the IDE that runs a first pass through the code, extracts all the procedure names and re-writes them as declares, and then either jams them into the top of the source code or into a second include file.
aaron wrote:... an attachment to the IDE that runs a first pass through the code, extracts all the procedure names and re-writes them as declares, and then either jams them into the top of the source code or into a second include file.
But than all structures have to be extracted and put before all declares, because there could be structure pointers as procedure argumnts! And the structures also have to be in the right order!
aaron wrote:... an attachment to the IDE that runs a first pass through the code, extracts all the procedure names and re-writes them as declares, and then either jams them into the top of the source code or into a second include file.
But than all structures have to be extracted and put before all declares, because there could be structure pointers as procedure argumnts! And the structures also have to be in the right order!
cu, helpy
And all prototypes has to be extracted and put before the structures who contain them.
Well, I'd be happy to wait a bit longer for a compile if it meant not having to worry about what order everything comes in. Sheesh, compiles of code even thousands of lines in size is happening in less than a second here. I remember compiling 500 lines of Clipper code on a 20 mhz AT and going out for a smoke waiting for it to finish!
Nowadays single pass compilation/compilers has/have "status" for some reason.
But the reason 1 pass compilation was considered important originally was because in the old days things like card-hoppers made 2 passes difficult. Had we had a different way to input, multiple pass would have been used.
In fact with paper (ticker) tape readers, some compilers could read in the source and build tables, etc, then re-read the paper tape backwards to do pass 2 and resolve the unresolved. This was considered waaaaay cool and elite and had "status".
netmaestro wrote:Well, I'd be happy to wait a bit longer for a compile if it meant not having to worry about what order everything comes in.
Agreed.
If speed was the original reason for one-pass, with most reasonable speed machines available these days, it's not really valid these days (apologies to those running on older/slower machines for budget reasons). There's no valid reason for declares.. be nice to get rid of them.. the earlier suggestion of the IDE plugin is ok, but it's still inserting (unnecessary) code.
netmaestro wrote:Well, I'd be happy to wait a bit longer for a compile if it meant not having to worry about what order everything comes in. Sheesh, compiles of code even thousands of lines in size is happening in less than a second here. I remember compiling 500 lines of Clipper code on a 20 mhz AT and going out for a smoke waiting for it to finish!
I remember exactly the same, those where the "good old days!!" wauw that is some 15 years back in time!!! Since i last used Clipper (5.02) in a commercial app......
Eeks 5000+ lines took 17 mins to compile!! On a 100Mhz machine a Wang to be precise who remembers Wang??
(I still mis Clipper........... sigh)
Jan V.
Life goes to Fast, Enjoy!!
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)