Removing unused procedures / stuff

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Removing unused procedures / stuff

Post by va!n »

dear pure team,
please add a the long requested feature to cut off not used stuff like unused procedures. thanks!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
inc.
Enthusiast
Enthusiast
Posts: 406
Joined: Thu May 06, 2004 4:28 pm
Location: Cologne/GER

Post by inc. »

Isn't that possible by using "Cutter" in jaPBe, or do I mix up something?
Check out OOP support for PB here!
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

I thought the 4.0 compiler doesn't include non-used procedures. Am I wrong?
Image Image
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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.
--Kale

Image
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.
quidquid Latine dictum sit altum videtur
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

what's happened when a label is defined inside an unused procedure ?

i'm just curious to know.
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
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post 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.
Athlon64 3700+, 1024MB Ram, Radeon X1600
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post 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.
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Phoenix
Enthusiast
Enthusiast
Posts: 141
Joined: Sun Sep 04, 2005 2:25 am

Post 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....
Konne
Enthusiast
Enthusiast
Posts: 434
Joined: Thu May 12, 2005 9:15 pm

Post by Konne »

Jop 4 is not perfect but far better than 3.94
Apart from that Mrs Lincoln, how was the show?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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 ?
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Post 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)?
Athlon64 3700+, 1024MB Ram, Radeon X1600
Jan Vooijs
Enthusiast
Enthusiast
Posts: 196
Joined: Tue Sep 30, 2003 4:32 pm
Location: The Netherlands

Post 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.
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)
inc.
Enthusiast
Enthusiast
Posts: 406
Joined: Thu May 06, 2004 4:28 pm
Location: Cologne/GER

Post 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.
Check out OOP support for PB here!
Post Reply