Methods

Windows specific questions.
Post Reply
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

Methods

Post by Thrawn89 »

Hey Its Mitth'raw'nuruodo,

I just have a couple of questions:

1. Can FB do methods?
2. If it can how/where do you define them, in the TYPEs?
3. Can you make a TYPE in another file and include it in a program?
4. If so how do you do it (include it part)?
5. How do you make the TYPE's variables in the include file private so they can't be referenced or changed in the program?
6. How do you make some of the methods in that TYPE private too?


Thank You,
Thrawn
mjs
Site Admin
Posts: 842
Joined: Jun 16, 2005 19:50
Location: Germany

Re: Methods

Post by mjs »

Thrawn89 wrote:1. Can FB do methods?
No, not yet.
Thrawn89 wrote:3. Can you make a TYPE in another file and include it in a program?
Yes.
Thrawn89 wrote:4. If so how do you do it (include it part)?

Code: Select all

#include "file_to_include.file_extension"
To all other questions: Not possible because FB doesn't have OO support yet.

Regards,
Mark
v1ctor
Site Admin
Posts: 3804
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Post by v1ctor »

Pseudo-OO can be done now like in http://www.freebasic.net/forum/viewtopic.php?t=1040
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

Post by Thrawn89 »

Thanks, ya I read that topic, well, and just waiting now for you guys to code in the OOP stuff into FB...

but Im glad it is intended for future releases of FB,

*sigh* in the mean time I'll just havefta settle for functions and that stuff to make fake oop...oh well

Thanks,
Thrawn

P.S. just a fun question: The BASIC language is procedural programming, and a lot of other languages are object oriented, but when FB supports oop what would it be classifed as? A procedural object oriented programming hybrid or mabey POOP for short? rofl
Of course I dont know what people will think when they ask "Whats FB?" and we say "FB is POO" (FreeBasic is procedural object oriented)...hahaha
Ok thats enough ;)
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

:PPP
MystikShadows
Posts: 612
Joined: Jun 15, 2005 13:22
Location: Upstate NY
Contact:

Post by MystikShadows »

Sophisticated FB now with class ROFLMAO there ya go look no more ;-)
Post Reply