Page 1 of 2

Removing unused procedures / stuff

Posted: Thu Jul 20, 2006 12:08 pm
by va!n
dear pure team,
please add a the long requested feature to cut off not used stuff like unused procedures. thanks!

Posted: Thu Jul 20, 2006 12:22 pm
by inc.
Isn't that possible by using "Cutter" in jaPBe, or do I mix up something?

Posted: Thu Jul 20, 2006 1:29 pm
by gnozal
inc. wrote:Isn't that possible by using "Cutter" in jaPBe, or do I mix up something?
Yes, the jaPBe 'Cutter plugin' works very well : it cuts all unused procedures from the current source.

Posted: Thu Jul 20, 2006 5:47 pm
by Straker
I thought the 4.0 compiler doesn't include non-used procedures. Am I wrong?

Posted: Thu Jul 20, 2006 6:29 pm
by Kale
Straker wrote:I thought the 4.0 compiler doesn't include non-used procedures. Am I wrong?
IIRC, It declares them all but doesnt define the unused ones.

Posted: Thu Jul 20, 2006 6:45 pm
by freak
The code of unused procedures is not included in the exe, but stuff like strings used inside will
still be in the exe's datasection.

Posted: Thu Jul 20, 2006 7:45 pm
by Flype
what's happened when a label is defined inside an unused procedure ?

i'm just curious to know.

Posted: Fri Jul 21, 2006 2:03 pm
by remi_meier
@freak
I didn't try with the final version of PB4, but in codes like

Code: Select all

procedure a()
  b()
endprocedure

procedure b()
  a()
endprocedure
without calling any procedure really, they were included in some betas I
tryed. The Cutter plugin of jaPBe can handle this.

Posted: Sat Jul 22, 2006 12:19 am
by va!n
Phoenix wrote:@remi_meier.... surely you should try that with version 4.0 final before commenting????
v4 has some nice and new features but i think a lot people as you can read on the forums dont want work with v4 due fact of some reasons i have to agree myself. maybe someone think about this sad situation, that old users prefer to use older 3.x versions instead the latest v4 - its not a really good sign for pb v4.

Posted: Sat Jul 22, 2006 12:23 am
by Phoenix
va!n wrote:v4 has some nice and new features but i think a lot people as you can read on the forums dont want work with v4 due fact of some reasons i have to agree myself. maybe someone think about this sad situation, that old users prefer to use older 3.x versions instead the latest v4 - its not a really good sign for pb v4.
Version 3 is not superior to version 4.... version 4 can do everything that version 3 does (and more!!!!) but not the other way around....

Posted: Sat Jul 22, 2006 12:47 am
by Konne
Jop 4 is not perfect but far better than 3.94

Posted: Sat Jul 22, 2006 11:51 am
by Fred
va!n wrote:
Phoenix wrote:@remi_meier.... surely you should try that with version 4.0 final before commenting????
v4 has some nice and new features but i think a lot people as you can read on the forums dont want work with v4 due fact of some reasons i have to agree myself. maybe someone think about this sad situation, that old users prefer to use older 3.x versions instead the latest v4 - its not a really good sign for pb v4.
May be more precisions ?

Posted: Sun Jul 23, 2006 11:34 am
by remi_meier
Phoenix wrote:@remi_meier.... surely you should try that with version 4.0 final before commenting????
I didn't see a comment after the betas that this limitation is "fixed" (it's no
bug).
I have testet it for you...

Code: Select all

Declare b()
Procedure a()
  b()
  b()
  ... etc.
EndProcedure

Procedure b()
  a()
  a()
  ... and so on for about 100 lines
EndProcedure
Empty exe:
2048 bytes

Compiled code from above:
3584 bytes


And btw, where is the small 1.5 KB footprint of an empty executable that
we had in the very first betas (at least in B1 that was true)?

Posted: Mon Jul 24, 2006 2:05 pm
by Jan Vooijs
Fred wrote:
va!n wrote:
Phoenix wrote:@remi_meier.... surely you should try that with version 4.0 final before commenting????
v4 has some nice and new features but i think a lot people as you can read on the forums dont want work with v4 due fact of some reasons i have to agree myself. maybe someone think about this sad situation, that old users prefer to use older 3.x versions instead the latest v4 - its not a really good sign for pb v4.
May be more precisions ?
Sorry for bumping this UP!

Fred,
You are wrong!! Maybe a few are still using 3.94 but a lot of people including myself are using 4.0 VERY happily!! I write more code than ever now with PB4. Since most issues I had with PRE 4.0 are solved, like:
- EnableExplicit, I love this!!
- StickyWindows() nice one,
- and other small factors.

And believe me I tried the lot of them, RapidQ (sadly it died), PowerBasic (to difficult, put one comma wrong and the ants for dinner), RealBasic (to difficult, no Forum [then], to expensive), .NET (who needs 30Gb to run a program of just 10 lines, which is 200k in itself?!)

Maybe if someone depends on a Linux version i can understand why they wait (as I here this is most of the time the reason), but if one who codes only for windows there is NO need to wait.
Except the odd dll which no longer works with PB4.0, like Icamplay sadly.

I find PB4.0 rock solid!! It gives meaningfull error messages, the IDE is stable (at last, sorry). Great fully working debugger right from the IDE, where you can even debug your INLINE assembler code, a itsibitsy crude: spliting of the EAX (and al like) into AX and AH and AL would be enormously appreciated.
Programs made with it are very stable!! I have ONE program running now for 4 weeks continue (on an MSCE machine) and it is rock stable! A webcam view program build in just a few days, and with an simple interface. And now building a webcam server program with motion detection, SMS alarm (MMS in the future), FTP-upload, possible more than one camera, etc...

PB is the ONLY program where you can try a few lines of code and put it into a working program: no 'setups', no projects to build, no hidden 'gems', extra libraries. Copy and paste and GO!! Just press ctrl-n do a ctrl-v press F5 your program runs.

Maybe you could update your website a litte, make it more current NOT all kinds of bells and whistles but more in line with the future. I mean some texts are way old, past there selling date (puch intended).
The rest of the site does NOT need a face-lift users who look for the likes of PureBasic are minimalistic people (like myself) no fancy flash-demos, moving menu's and the likes.

I found PureBasic intersting 3 years ago because the site was sober and precise, the forum was (and is NOW even more) great.
Everybody helps everybody. No yells like "RTFM you NOOB" and the likes you see on other sites, where you have the NOOBS and the PRO's and they do not mingle! Here yes they do! Personally i find the forum invalluable! It is where i find the information which i lack or get the direction where to seek it.

And where can yo interact with it's developer(s) well HERE you can!!

Fred and the team:

No the future of PureBasic 4.0 and up is BRIGHT!!

Thanks for a trully very great program!!

Jan V.

Posted: Mon Jul 24, 2006 3:31 pm
by inc.
Maybe a few are still using 3.94 but a lot of people including myself are using 4.0 VERY happily!!
Totally agree.